#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);
	if (n == 0)
	{
		printf("1");
	}
	else
	{
		t = sqrt(n) + eps;
		for (int i = t; i >= 1; --i)
		{
			if (n % i == 0)
			{
				ll a = n / i;
				while (a > 0)
				{
					++result;
					a /= 10;
				}
				break;
			}
		}
		printf("%d", result);
	}
}