#include<iostream>

using namespace std;

int main(void){
  int i=0,n=0,a[200],b=0;
  while(cin >> i >> n){
    a[b] = i+n;
    b++;
    i=0; n=0;
  } 
  for(i=0;i<=b;i++){
    while(a[i]!=0){
      a[i] = a[i]/10;
      n++;
    }
    cout << n <<endl;
    n = 0;
  }
}