Problem:
Digit Number

Write a program which computes the digit number of sum of two integers a and b.

Input

There are several test cases. Each test case consists of two non-negative integers a and b which are separeted by a space in a line. The input terminates with EOF.

Constraints

0 ≤ a, b ≤ 1,000,000

The number of datasets ≤ 200

Output

Print the number of digits of a + b for each data set.

Sample Input

5 7
1 99
1000 999

Output for the Sample Input

2
3
4

Solution in JAVA (judge verdict: Accepted)

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
//package aojdigitnumber;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

/**
 *
 * @author in2
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        Scanner sc = new Scanner(System.in);
        while( sc.hasNext() ){
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = a + b;
            int count = 0;
            while(c!=0){
                c = c/10;
                count++;
            }
           System.out.println(count);
        }
    }
}