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