n = int(eval(input()))

min_f = 10

for i in range(1, n + 1):

    if i ** 2 > n:

        break

    if n % i != 0:

        continue

    min_seq = max(len(str(i)), len(str(n // i)))

    if min_seq < min_f:

        min_f = min_seq

print(min_f)
n = int(eval(input()))

n_sqrt = int(n ** 0.5) + 1

ans = float('inf')

for i in range(1, n_sqrt + 1):

    if n % i == 0:

        j = int(n // i)

        max_len = max(len(str(i)), len(str(j)))

        ans = min(max_len, ans)

print(ans)
n = int(eval(input()))
min_f = 10
for i in range(1, n + 1):
    if i**2 > n:
        break
    if n % i != 0:
        continue
    min_seq = max(len(str(i)), len(str(n // i)))
    if min_seq < min_f:
        min_f = min_seq
print(min_f)

n = int(eval(input()))
n_sqrt = int(n**0.5) + 1
ans = float("inf")
for i in range(1, n_sqrt + 1):
    if n % i == 0:
        j = int(n // i)
        max_len = max(len(str(i)), len(str(j)))
        ans = min(max_len, ans)
print(ans)

-min_f = 10 -for i in range(1, n + 1): -    if i**2 > n: -        break -    if n % i != 0: -        continue -    min_seq = max(len(str(i)), len(str(n // i))) -    if min_seq < min_f: -        min_f = min_seq -print(min_f) +n_sqrt = int(n**0.5) + 1 +ans = float("inf") +for i in range(1, n_sqrt + 1): +    if n % i == 0: +        j = int(n // i) +        max_len = max(len(str(i)), len(str(j))) +        ans = min(max_len, ans) +print(ans)