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