#include<iostream>
using namespace std;

int main(){

	int a[100];
	int b[100];
	int i = 0;
	int N;

	while(1){
		cin >> a[i];
		cin >> b[i];

		if (a[i]==EOF) break;
		i++;
	}
	N = i;
	i = 0;
	
	int j=1;
	int ans=0;

	for(i;i<=N;i++){
		while(1){
			if((((a[i]+b[i]) / j))!=0){
				ans++;
			}
			else break;

			j = j * 10;
		}
		cout << ans << endl;
		ans = 0;
		j = 1;
	}

}