#include <cstdio>
#include <cmath>

int main() {
	int a, b, c, d;
	while (~scanf("%d%d", &a, &b)) {
		if (a == 0) c = 1;
		else c = log10((double)a) + 1;
		if (b == 0) d = 1;
		else d = log10((double)b) + 1;
		printf("%d\n", c + d);
	}
}