#include <iostream>

int main()
{
  using namespace std;

  unsigned int a(0), b(0), temp(0), cnt(0);

  do {
    cin >> a, cin >> b;
    temp = a + b;
    for(cnt = 0; temp = temp/10; ++cnt);
    cout << ++cnt << endl;
  } while(a && b);

  return 0;
}