11512 - Carry in   

Description

Compute how many carries will occur when calculating the sum of two decimal numbers A and B.

Input

For each case a line, there are two positive integers A and B. There are multiple cases (<1000) terminated by EOF.

Case #1: 0<A, B<1000

Case #2: 0<A, B<10^6

Case #3: 0<A, B<10^12

Case #4: 0<A, B<10^1000

Output

For each case a line, output how many carries occur.

Sample Input  Download

Sample Output  Download

Tags

123



Discuss