#include <iostream>
#include<math.h>
using namespace std;

int main() {
	float a,b,sum;
	int cont=0;
	do
	{
	cin>>a;cin>>b;
	}while(a<0||a>1000000||b<0||b>1000000);
	sum=a+b;
	do
	{
		sum=sum/10;
		cont++;
	}while(floor(sqrt(sum))!=0);
	cout<<cont<<endl;
	return 0;
}