#include<iostream>

using namespace std;



long  n(int k){
       if(k<10&&k>0) return 1;
     if(k>=10&&k<=99) return 2;
     if(k>=100&&k<=999) return 3;
     if(k>=1000&&k<=9999) return 4;
     if(k>=10000&&k<=99999) return 5;
     if(k>=100000&&k<=999999) return 6;
     
     return n(k);
     }

int main(){
    
    
    int i,j,k;
    
    cin>>i;
    cin>>j;
    k=i+j;
  
    cout<<n(i);
      return 0;
    
  
    
    }