#include <iostream>
#include <cmath>
#include<algorithm>
using namespace std;
int bits(long long num)
{
	if (num / 10000000000)
		return 11;
	else if (num / 1000000000)
		return 10;
	else if(num/100000000)
		return 9;
	else if(num/10000000)
		return 8;
	else if (num / 1000000)
		return 7;
	else if (num / 100000)
		return 6;
	else if (num / 10000)
		return 5;
	else if (num / 1000)
		return 4;
	else if (num / 100)
		return 3;
	else if (num / 10)
		return 2;
	else
		return 1;
}
int main()
{
	long long N;
	while (scanf("%lld", &N) != EOF)
	{
		for (long long i = sqrt(N); i > 0; i--)
			if (N % i == 0)
			{
				printf("%d\n", max(bits(i), bits(N / i)));
				break;
			}
	}
}