#include <cstdio>

int inline length(int x){
	int result = 0;
	do{
		result++;
		x /= 10;
	}
	while (x > 0);
	return result;
}

int main(){
	int a, b;
	
	while (scanf("%d %d", &a, &b) != EOF){
		printf("%d\n", length(a + b));
	}
	
	return 0;
}