#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
	  int a,b,sum=0;
	  while((scanf("%d", &a) != EOF)&&scanf("%d", &b) != EOF)
	  {
	  int lengthA=1,lengthB=1;
	  while(a/=10)
          {lengthA++;}		   		
	  while(b/=10)
	  {lengthB++;}
	  cout<<lengthA+lengthB<<endl;
	  }	   
          return 0;
}