/*
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0002
 */
#include <iostream>
#include <sstream>

using namespace	std;

int
main()
{
	string line;
	while (getline(cin, line)) {
		int a, b;
		istringstream iss(line);
		ostringstream oss;
		iss >> a >> b;
		oss << a + b;
		cout << oss.str().length() << endl;
	}
}