#include <iostream>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	if(0 <= a+b&&a+b < 10){
		cout<<"1"<<endl;
	}else if(10 <= a+b&&a+b < 100){
		cout<<"2"<<endl;
	}else if(100 <= a+b&&a+b < 1000){
		cout<<"3"<<endl;
	}else if(1000 <= a+b&&a+b < 10000){
		cout<<"4"<<endl;
	}else if(10000 <= a+b&&a+b <100000){
		cout<<"5"<<endl;
	}else if(100000 <= a+b&&a+b < 1000000){
		cout<<"6"<<endl;
	}else if(1000000<=a+b&&a+b<20000001){
		cout<<"7"<<endl;
	}

}