#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	while (1){
		cin >> a >> b;
		if (cin.eof()) break;
		if (a == b and a == 0) cout << 1 << endl;
		else cout << int(log10(a + b)) + 1 << endl;
	}
}
