#include <iostream>

using namespace std;

int main(int argc, char const *argv[]) {
	int a, b, ans;

	while ((cin >> a >> b) != 0) {
		a = a + b;
		for (ans = 0; a > 0; ans++) a /= 10;
		cout << ans << endl;
	}

	return 0;
}