#include<stdio.h>

int main(void)
{
 int a,b,sum;

 while(1){
  int i=10;
  int count=1;

  if(scanf("%d %d",&a,&b)<2) break;
  
  sum=a+b;

  if(a<0 || b<0) break;

  while(1){
   if(sum<i){
   printf("%d\n" ,count);
   break;
   }else{
   i=i*10;
   count++;
   }
  }
 }
 return 0;
}