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