int main()
{
  int a,b;
  int count1=0,count2=0;
  int sum;
  while(scanf("%d%d",&a,&b)!= EOF)
  {
   while(a < 1000000 && a>0)
    {
     a /= 10;
     count1++;
    }
   while(b < 1000000 && b>0)
    {
     b /= 10;
     count2++;
    }
   sum = count1+count2;
   printf("%d\n",sum);
   count1=0;
   count2=0;
   sum=0;

  }
  return 0;
}
