#include <cstdio>
#include <cstdlib>
#include <cmath>

using namespace std;

int main(void) {
	int p, q;
	while(scanf("%d %d", &p, &q) == 2) {
		int s = p + q;
		int ans = (int)log10((double)s) + 1;
		printf("%d\n", ans);
	}
	return 0;
}