import numpy





def F(A, B):

    count = 0

    while A > 0 or B > 0:

        A //= 10

        B //= 10

        count += 1

    return count





N = int(eval(input()))

res = 10

for A in range(1, int(numpy.sqrt(N)) + 1):

    if N % A == 0:

        B = N // A

        res = min(res, F(A, B))

print(res)
import math

N = int(eval(input()))



res = N

for A in range(1, int(math.sqrt(N)) + 1):

    if N % A == 0:

        B = N // A

        res = min(res, max(len(str(A)), len(str(B))))

print(res)
import numpy


def F(A, B):
    count = 0
    while A > 0 or B > 0:
        A //= 10
        B //= 10
        count += 1
    return count


N = int(eval(input()))
res = 10
for A in range(1, int(numpy.sqrt(N)) + 1):
    if N % A == 0:
        B = N // A
        res = min(res, F(A, B))
print(res)

import math

N = int(eval(input()))
res = N
for A in range(1, int(math.sqrt(N)) + 1):
    if N % A == 0:
        B = N // A
        res = min(res, max(len(str(A)), len(str(B))))
print(res)

-import numpy - - -def F(A, B): -    count = 0 -    while A > 0 or B > 0: -        A //= 10 -        B //= 10 -        count += 1 -    return count - +import math -res = 10 -for A in range(1, int(numpy.sqrt(N)) + 1): +res = N +for A in range(1, int(math.sqrt(N)) + 1): -        res = min(res, F(A, B)) +        res = min(res, max(len(str(A)), len(str(B))))