#include<iostream>
using namespace std;
int main() {
	int x,y,z;
	for(int i=0;i<200;i++){
		cin>>x>>y;
		z=x+y;
		if(z<10){
			cout<<1<<endl;
		}else if(z<100){
			cout<<2<<endl;
		}else if(z<1000){
			cout<<3<<endl;
		}else if(z<10000){
			cout<<4<<endl;
		}else if(z<100000){
			cout<<5<<endl;
		}else if(z<100000){
			cout<<6<<endl;
		}else if(z<1000000){
			cout<<7<<endl;
		}
	}
return 0;
}
