#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cstdlib>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <sstream>

using namespace std;

class c_main
{
private:
    
public:
    c_main();
    void f_input();
    int f_digit(int sum);
};

int c_main::f_digit(int sum){
    int digit=0;
    while(sum!=0){
        sum /= 10;
        digit++;
    }
    return digit;
}

c_main::c_main()
{
    int a,b;
    int cnt;
    
    cnt = 0;
    
    for (;cin >> a >> b;){
        cout << f_digit(a+b) << endl;
    }
}

void c_main::f_input()
{
    
}

int main(){
    c_main main01;
    main01.f_input();
    
    return 0;
}