N = int(eval(input()))





def func(n):

    return 11 if (N % n > 0) else len(str(N // n))



nn = min(list(range(1, int(N**(0.5) + 1))), key=func)

ans = len(str(N // nn))



print(ans)

def main():

    N = int(eval(input()))

    n = int(N**(0.5) + 1)

    while N % n > 0:

        n -= 1

    print((len(str(N // n))))





if __name__ == '__main__':

    main()

N = int(eval(input()))


def func(n):
    return 11 if (N % n > 0) else len(str(N // n))


nn = min(list(range(1, int(N ** (0.5) + 1))), key=func)
ans = len(str(N // nn))
print(ans)

def main():
    N = int(eval(input()))
    n = int(N ** (0.5) + 1)
    while N % n > 0:
        n -= 1
    print((len(str(N // n))))


if __name__ == "__main__":
    main()

-N = int(eval(input())) +def main(): +    N = int(eval(input())) +    n = int(N ** (0.5) + 1) +    while N % n > 0: +        n -= 1 +    print((len(str(N // n)))) -def func(n): -    return 11 if (N % n > 0) else len(str(N // n)) - - -nn = min(list(range(1, int(N ** (0.5) + 1))), key=func) -ans = len(str(N // nn)) -print(ans) +if __name__ == "__main__": +    main()