n = int(eval(input()))



min_digits = 100

for i in range(int(n ** 0.5) + 1):

    a = i + 1

    if n % a != 0:

        continue

    b = n // a

    x = max([a, b])

    digits = len(str(x))

    if digits < min_digits:

        min_digits = digits



print(min_digits)

def main():

    n = int(eval(input()))



    m = int(n ** 0.5)

    if n < 4:

        m += 1



    min_f = len(str(n))



    for i in reversed(list(range(1, m + 1))):

        if n % i == 0:

            b = n // i

            db = len(str(b))

            di = len(str(i))

            f = max(db, di)

            if f < min_f:

                min_f = f



    print(min_f)





if __name__ == '__main__':

    main()

n = int(eval(input()))
min_digits = 100
for i in range(int(n**0.5) + 1):
    a = i + 1
    if n % a != 0:
        continue
    b = n // a
    x = max([a, b])
    digits = len(str(x))
    if digits < min_digits:
        min_digits = digits
print(min_digits)

def main():
    n = int(eval(input()))
    m = int(n**0.5)
    if n < 4:
        m += 1
    min_f = len(str(n))
    for i in reversed(list(range(1, m + 1))):
        if n % i == 0:
            b = n // i
            db = len(str(b))
            di = len(str(i))
            f = max(db, di)
            if f < min_f:
                min_f = f
    print(min_f)


if __name__ == "__main__":
    main()

-n = int(eval(input())) -min_digits = 100 -for i in range(int(n**0.5) + 1): -    a = i + 1 -    if n % a != 0: -        continue -    b = n // a -    x = max([a, b]) -    digits = len(str(x)) -    if digits < min_digits: -        min_digits = digits -print(min_digits) +def main(): +    n = int(eval(input())) +    m = int(n**0.5) +    if n < 4: +        m += 1 +    min_f = len(str(n)) +    for i in reversed(list(range(1, m + 1))): +        if n % i == 0: +            b = n // i +            db = len(str(b)) +            di = len(str(i)) +            f = max(db, di) +            if f < min_f: +                min_f = f +    print(min_f) + + +if __name__ == "__main__": +    main()