#include <iostream>
#include <math.h>
using namespace std;

int main() {
	int a,b,c = 0,ans = 0;
	for(int i = 0; i < 200; i ++){
		if(0 <= a || 0 <= b <= 1000000){
		cin >> a >> b;
		c = a + b;
		ans = (int)log10((double)c) + 1;
		cout << ans << endl;
	}
	}
	return 0;
}