#include<cstdio>
#include<cmath>
int main()
{
	long long n;
	int s = 0, ans;
	scanf("%lld",&n);
	for(int i = sqrt(n);i;i--)
		if(!(n % i))
		{
			ans = n / i;
			while(ans)
			{
				ans /= 10;
				s++;
			}
			printf("%d\n",s);
			return 0;
		}
}