#include <stdio.h>
#include <stdlib.h>

int main(void){
  int c = 0, i, j, a, b, d;
  char tmp[8]; // 0 - 1000000
  for(j = 0; c != EOF && j <= 200; j++){
    if( j != 0){
      printf("\n");
    }
    i= 0;
    while((c = getchar()) != EOF && c != '\n'){
      tmp[i++] = c;
      if(c == ' '){
        tmp[i] = '\0';
        a = atoi(tmp);
        i = 0;
      }
    }
    tmp[i] = '\0';
    b = atoi(tmp);

    d = a + b;
    for(i = 0; d != 0; i++){
      d /= 10;
    }
    printf("%d", i);
  }
  return 0;
}