#include <iostream>
using namespace std;

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