11425 - 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<106

Case #3: 0<A, B<1012

Case #4: 0<A, B<101000

Output

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

Sample Input  Download

Sample Output  Download

Tags




Discuss