#include<iostream>
using namespace std;

int main(){

int i,d,n1,n2,sum,c;


int a[d],b[d];


d=0;
while(d<200){
   cin >> n1 >> n2;
   if(n1 >= 0 and n1 <= 1000000 and n2 >= 0 and n2 <= 1000000){
       a[i]=n1;
       b[i]=n2;
    }
    d++;
}



for (i = 0; i < d; i++) {
     c=0;
     sum=a[i]+b[i];
     while((sum/10)!=0){
         c++;
         sum=sum/10;
     }
   cout << c+1 << "\n";
}

    return 0;
}