#include <iostream>
#include <vector>
#include <algorithm>

#define ALL(a) a.begin(),a.end()

using namespace std;

int main()
{
  unsigned a = 1, b;

  while ( a ) {
    cin >> a >> b;
    int c = 1, n = a + b;
    while ( n /= 10 )
      c++;
    if ( n == 0 )
      cout << 0 << endl;
    else
      cout << c << endl;
  }

  return 0;
}