#include<stdio.h>

 int main(void){
   int div;
   int i,s,sum,count;
   while(fscanf(stdin,"%d %d",&i,&s) != EOF){
     sum = i + s;
     div = 1;
     count = 0;
     while(1){
       if(sum/div == 0){
         break;
       }
       div *= 10;
       count++;
     }

     printf("%d\n",count);
   }

   return 0;
 }