#include<iostream>
using namespace std;

int main(){

	int num[200][2];
	int count=0;

	while(cin >> num[count][0] >> num[count][1]){
		count++;
		if(count>199){
			break;
		}
	}

	int sum;

	for(int i=0;i<count;i++){
		sum=num[i][0]+num[i][1];
		int ans=0;

		while(sum!=0){
			sum = sum/10;
			ans++;
		}
		cout << ans << endl;
	}

    return 0;
}
