#include<iostream>

using namespace std;

int main(){
  int a,b;
  while(1){
    float c;
    cin >> a >> b;
    a+=b;
    if(cin.eof())break;
    for(;a/10.0>0.0;c++){
      a%=10;
    }
    cout << c << endl;
  }

  return 0;
}