#include <cstdio>
#include <algorithm>

using namespace std;

int main() {
	while(true) {
		int a,b;
		if(scanf("%d%d", &a, &b)<2)break;
		a+=b; b=0;
		while(a)b++,a/=10;
		printf("%d\n",b);
	}
	return 0;
}