 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;
 
 int compare(int a,int b)
 {
   return a>b;    
 }

 int main()
 {
   int m,n;
   while(cin>>m>>n)
   {
     int sum=m+n;
     int count=0;
     while(sum)
     {
       count++;
       sum/=10;          
     }
     cout<<count<<endl;                
   }
   //while(1);      
   return 0;    
 }
 