#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
using namespace std;

 
int main()
{
  int a,b;
  while(cin >> a >> b, !cin.eof()) {
    stringstream ss;
    ss << (a + b);
    string str = ss.str();
    cout << str.size() << endl;
  }
  return 0;
}