#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	float a,b,sum;
	int cont=0;
	cin>>a;cin>>b;
	sum=a+b;
	do
	{
		sum=sum/10;
		cont++;
	}while(floor(sqrt(sum))!=0);
	cout<<cont<<endl;
	return 0;
}