In addition shown below, each of the letters A, B, C, D, and E represents one of the digits from 1 up to 5 (equal letters represent equal digits and different letters represent different digits). The first and last digits of the sum are given.