#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main(){
  unsigned a, b;

  while( 1 )
    {
      cin >> a >> b;
      string c = to_string( a + b );
      cout << c.length() << endl;
    }

  return 0;
}