#include <stdio.h>
int main()
{
  int a,b,sum,cou;
  while( scanf("%d %d",&a,&b)!=EOF){
    sum=a+b;
    cou=2;
    while(1){      
      sum=sum/10;
      //printf("%d\n",sum);
      if(sum<10)break;
    }
    printf("%d\n",cou);
  }
  return 0;
}