#include <bits/stdc++.h>
using namespace std;

int digit(int i) {
  int cnt = 0;
  while (i > 0) {
    i /= 10;
    cnt++;
  }
  return cnt;
}

int main(){
  int a, b;
  while (cin >> a >> b) {
    cout << digit(a + b)  << endl;
  }
}
