#include <iostream>  
using namespace std;  
 
int main()   
{  
    int n1,n2;
cin>>n1;
cin>>n2;
int count=0;
int sum;
sum= n1 + n2;
while(sum)
{
int d;
d= sum % 10;
count++;
sum= sum / 10;
}
cout<<count<<endl;
}