#include <iostream>
#include <sstream>
using namespace std;


string toString(long long n){
  stringstream ss;
  ss << n;
  return ss.str();
}
int main(){
  long long  a, b;
  while( cin >> a >> b ){
    cout << toString(a + b).size() << endl;
  }

}