#include <iostream>
#include <algorithm>
#include <functional>
inline int recfunc(int n,int c){
  c++;
  if(n>=10)return recfunc(n/10,c);
  else{return c;}
}
int main(){
  int a,b;
  using std::cin;
  while(cin>>a>>b){
    if(cin.eof())break;
    int c = a + b;
    using std::cout;
    using std::endl;
    cout<<recfunc(c,0)<<endl;
  }
  return 0;
}