#include<iostream>
using namespace std;

int main(){
	int a;
	int b;
	int sum;

	while (cin >> a >> b){
		sum = a + b;
		if (sum < 10){
			cout << 1 << endl;
		}
		else if (sum > 10 && sum < 100){
			cout << 2 << endl;
		}
		else if (sum < 1000 && 100 < sum){
			cout << 3 << endl;
		}
		else if (sum < 10000 && 1000 < sum){
			cout << 4 << endl;
		}
		else if (sum < 100000 && 10000 < sum){
			cout << 5 << endl;
		}
		else if (sum < 1000000 && 100000 < sum){
			cout << 6 << endl;
		}
		else if (sum < 10000000 && 1000000 < sum){
			cout << 7 << endl;
		}
	}

	return 0;
}
