#include<iostream>
using namespace std;

int main()
{
  int a,b,hoge,fuga;

  cin>>a>>b;

  hoge = a + b;

  if(hoge < 10)
    fuga = 1;
  else if(hoge < 100)
    fuga = 2;
  else if(hoge < 1000)
    fuga = 3;
  else if(hoge < 10000)
    fuga = 4;
  else if(hoge < 100000)
    fuga = 5;
  else if(hoge < 1000000)
    fuga = 6;
  else if(hoge < 10000000)
    fuga = 7;

  cout<<fuga<<endl;

  return 0;
}