N = int(input())



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



    if i*i > N:

        break



    elif i*i == N:

        t = i

        break



    if N % i == 0:

        t = i



print(len(str(N/t)))
N = int(input())



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



    if i*i > N:

        break



    if N % i == 0:

        t = i



print(len(str(N/t)))
N = int(input())
for i in range(1, N + 1):
    if i * i > N:
        break
    elif i * i == N:
        t = i
        break
    if N % i == 0:
        t = i
print(len(str(N / t)))

N = int(input())
for i in range(1, N + 1):
    if i * i > N:
        break
    if N % i == 0:
        t = i
print(len(str(N / t)))

-    elif i * i == N: -        t = i -        break