Consider a sequence consisting of all possible words of length , where letters A, B, and C are used in even positions, and letters D and E are used in odd positions. The positions in the words are numbered from left to right, starting with . This sequence is arranged in lexicographical order.
Given two words from this sequence, determine the total number of words in the sequence that lie strictly between them.
The input consists of two lines. The first line contains the first word, and the second line contains the second word. Both words have the same length, which does not exceed .
Output a single line containing the number of words that are strictly between the two given words in the sequence.
Example 1