#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(void){
	int i, j;
	while (cin >> i >> j){
		int tmp = i+j;
		stringstream ss;
		ss << tmp;
		string c = ss.str();
		cout << c.length() << endl;
	}
	return 0;
}