#include <iostream>
using namespace std;

int main()
{
  int a,b;

  cin>>a;
  cin>>b;

  if((a+b)/10==0)
    cout<<1<<endl;
  else if(0<(a+b)/10 && (a+b)/10<10)
    cout<<2<<endl;
  else if (0<(a+b)/100 && (a+b)/100<10)
    cout<<3<<endl;
  else if (0<(a+b)/1000 && (a+b)/1000<10)
    cout<<4<<endl;
  else if (0<(a+b)/10000 && (a+b)/10000<10)
    cout<<5<<endl;
  else if (0<(a+b)/100000 && (a+b)/100000<10)
    cout<<6<<endl;
  else if (0<(a+b)/1000000 && (a+b)/1000000<10)
    cout<<7<<endl;

  return 0;
}
