#include <iostream>
#include <vector>
#include <string>
#include <sstream>

using namespace std;

int main(int argc, char *argv[]) {
  int a, b;
  vector<int> result;
  stringstream ss;

  while (true) {
    cin >> a >> b;
    if (cin.eof())
      break;
    result.push_back(a+b);
    cin.clear();
  }
  for (int i = 0; i < result.size(); i++) {
    ss << result[i];
    cout << ss.str().size() << endl;
    ss.str("");
  }
}