#include <iostream>
using namespace std;

int main(){
	int a, b, sum, d = 1;
	while(cin >> a >> b){
		while(!(((a >= 0)&&(a <= 1000000))&&((b >= 0)&&(b <= 1000000)))){
			cout << "wrong value\n";
			cin >> a >> b;
		}
		sum = a + b;
		while((sum / 10) != 0){
			d++;
			sum /= 10;
		}
		cout << d << "\n";
		d = 1;
	}
    return 0;
}