#include <fstream>
#include <iostream>
#include <string>

using namespace std;

int main(){
	int a, b;
	while (EOF){
		cin >> a >> b;
		string s = to_string(a + b);
		cout << s.length() << endl;
	}
	return 1;
}