def F(a, b):

    def _(n):

        c = 0

        while n:

            n //= 10

            c += 1

        return c



    return _(max(a, b))





N = int(eval(input()))

ans = float('inf')

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

    b = N // a

    if a > b:

        break

    if b != N / a:

        continue

    ans = min(ans, F(a, b))

print(ans)

def F(a, b):

    # def _(n):

    #     c = 0

    #     while n:

    #         n //= 10

    #         c += 1

    #     return c



    # return _(max(a, b))

    return len(str(max(a, b)))





N = int(eval(input()))

ans = float('inf')

n = int(N**0.5) + 1

for a in range(1, n):

    b = N // a

    if b != N / a:

        continue

    ans = min(ans, F(a, b))

print(ans)

def F(a, b):
    def _(n):
        c = 0
        while n:
            n //= 10
            c += 1
        return c

    return _(max(a, b))


N = int(eval(input()))
ans = float("inf")
for a in range(1, N + 1):
    b = N // a
    if a > b:
        break
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)

def F(a, b):
    # def _(n):
    #     c = 0
    #     while n:
    #         n //= 10
    #         c += 1
    #     return c
    # return _(max(a, b))
    return len(str(max(a, b)))


N = int(eval(input()))
ans = float("inf")
n = int(N**0.5) + 1
for a in range(1, n):
    b = N // a
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)

-    def _(n): -        c = 0 -        while n: -            n //= 10 -            c += 1 -        return c - -    return _(max(a, b)) +    # def _(n): +    #     c = 0 +    #     while n: +    #         n //= 10 +    #         c += 1 +    #     return c +    # return _(max(a, b)) +    return len(str(max(a, b))) -for a in range(1, N + 1): +n = int(N**0.5) + 1 +for a in range(1, n): -    if a > b: -        break