#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int a,b;
    for(int i=1;i>0;)
    {
        cin>>a>>b;
        if(a!=EOF)
        {
        cout<<(int)log10(a+b)+1<<endl;
        }
        else return 0;
    }
    return 0;
}
