 #include<iostream>
#define END EOF
using namespace std;
int digit(int);
int main(){
  int a,b,x;
  while(cin >>a>>b && a!=EOF){
    x=a+b;
    cout <<digit(x)<<endl;}
    return 0;
}

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