#include<iostream>

int getDigit(int x){
  int digit = 0;

  while(x > 0){
    x /= 10;
    ++digit;
  }
  return digit;
}

int main(){
  const int min = 0;
  const int max = 1000000;
  const int data = 200;
  int a,b,i = 0;
  while(std::cin >> a >> b && i < data){
    if(a >= min && a <= max && b >= min && b <= max)
      std::cout << getDigit(a + b) << std::endl;
  }
}