#include<iostream>
using namespace std;
int main(){
  cin.tie(0);
  int a,b,ans;
  while(cin>>a>>b){
    ans=a+b;
    if(ans<=9){
      cout<<"1"<<endl;
    }else if(ans<=99){
      cout<<"2"<<endl;
    }else if(ans<=999){
      cout<<"3"<<endl;
    }else if(ans<=9999){
      cout<<"4"<<endl;
    }else if(ans<=99999){
      cout<<"5"<<endl;
    }else if(ans<=999999){
      cout<<"6"<<endl;
    }else if(ans<=9999999){
      cout<<"7"<<endl;
    }
  }
  return 0;
}