Children are taught to add multi-digit numbers from right to left, one digit at a time. Many children consider the operation of carrying (when a value is transferred to the next digit place) to be quite challenging. Your task is to count the number of carry operations needed for each addition problem (to evaluate its complexity).
Let us generalize the problem and solve it for numbers in any base .
The first line contains a single integer (2 \leq P \leq 62), which defines the numeral system. The second line contains an integer L_1 (1 \leq L_1 \leq 62000) — the length of the first addend (in characters). The third line contains the first addend. The fourth line contains an integer L_2 (1 \leq L_2 \leq 62000) — the length of the second addend. The fifth line contains the second addend.
For bases greater than , the digits are the uppercase English letters (A - Z); for bases greater than , lowercase English letters (a - z) are also used.
Print a single integer — the number of carry operations required to add the two given numbers in base .
Example 1