#include<bits/stdc++.h>
using namespace std;
int N, M=0;
int main () {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	while (cin>>N>>M) {
		N+=M+1;
		if (N==1) {
			cout<<1<<endl;
		}
		else cout<<ceil(log(N)/log(10))<<endl;
	}
}