#include<iostream>
#include<cmath>
using namespace std;

int main(){
	int a[400]={0};
	int i=0,n=0,s=0,d=0;
	while(cin>>a[i++]);n=i-1;
	
	for(int j=0;j<n;j+=2){
		cout<<a[j]<<" "<<a[j+1]<<endl;
	}
	
	for(int j=0;j<n;j+=2){
		s=a[j]+a[j+1];
		d=(int)log10((double)s);d++;
		cout<<d<<endl;
	}
	
	return 0;
}