#include<stdio.h>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
using namespace std;



int main(void)
{
  int a,b,c;
  vector<int> array;
  int i=0;
  while(1)
    {
	 ostringstream s;
     string os;	
	 cin>>a>>b;
	 if(!cin)break;
	  c=a+b;
      s <<c;
	  os=s.str();

	//  cout<<os.size()<<endl;
      array.push_back((os.size()));

	  s.clear();
	  os.clear();

	  if(array.size()==200)break;
	  
    }

  while(i<array.size())
    {
      cout<<array[i]<<endl;
	  i++;
    }
  array.clear();
}