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



int main(void)
{
  //string stream s;
  ostringstream s;
  string os;
  int a,b,c;
  vector<int> array;
  int i=0;
  while(cin>>a>>b)
    {
      s <<(a+b);
	  os=s.str();
	  //cout<<os<<endl;
	  //cout<<os.size()<<endl;
      array.push_back(os.size());


    }

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

}