#include<iostream>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  int a, b;
  while (cin >> a >> b) {
    a += b;
    if (a == 0) {
      cout << 1 << endl;
      continue;
    }
    b = 0;
    while (a > 0) {
      a /= 10;
      ++b;
    }
    cout << b << endl;
  }
  return 0;
}