#include<iostream>
using namespace std;

int main(){
	int a, b;
	while (cin >> a >> b){
		int c = a + b;
		if (c == 0){
			cout << 1 << endl;
			continue;
		}
		int k = 0;
		while (c > 0){
			c = c / 10;
			k++;
		}
		cout << k << endl;
	}
	return 0;
}