#include <iostream>
using namespace std;

int main() {
	int a, b;
	int D[200] = { 0 };
	for (int i = 0; i < 200; ++i) {
		int digits = 1;
		cin >> a >> b;
		int n = a + b;
		n /= 10;
		while (n) {
			++digits;
			n /= 10;
		}
		D[i] = digits;
	}

	for (int i = 0; i < 200; ++i) {
		if (D[i] == 0) {
		}
		else {
			cout << D[i] << endl;
 		}
	}
}
