#include<cstdio>
#include<cmath>

typedef long long ll;

const double eps = 1e-9;

int main(void)
{
	ll n,t;
	int result = 0;
	scanf("%lld", &n);
	t = sqrt(n)+eps;
	for (int i = t; i >=1; --i)
	{
		if (n % i == 0)
		{
			ll a = n / i;
			while (a)
			{
				++result;
				a /= 10;
			}
			break;
		}
	}
	printf("%d", result);
}