#include <iostream>

using namespace std;

int main() {
	for (int a, b; cin >> a >> b && a && b;) {
		a += b;
		int count = 0;
		for (; a; a /= 10) {
			count++;
		}
		cout << count << endl;
	}
	return 0;
}