#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int a,b,n,i,count;
    while(2==scanf("%d %d", &a, &b))
    {
        n = a+b;
        count=0;
        while(n!=0)
        {
            i = n%10;
            n/=10;
            count++;
        }
        cout<<count<<endl;
    }
    return 0;
}