import sys



n = int(sys.stdin.readline().rstrip())



def main():

    a = 1

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

        if n % i == 0:

            a = i

    b = n // a

    ans = len(str(b))

    return ans



if __name__ == '__main__':

    ans = main()

    print(ans)
import sys



def divisors(n):

  res = []

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

    if n % i: continue

    res.append(i)

  return res



n = int(sys.stdin.readline().rstrip())



def main():

    res = divisors(n)

    print((len(str(n // res[-1]))))



if __name__ ==  '__main__':

    main()
import sys

n = int(sys.stdin.readline().rstrip())


def main():
    a = 1
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            a = i
    b = n // a
    ans = len(str(b))
    return ans


if __name__ == "__main__":
    ans = main()
    print(ans)

import sys


def divisors(n):
    res = []
    for i in range(1, int(n**0.5) + 1):
        if n % i:
            continue
        res.append(i)
    return res


n = int(sys.stdin.readline().rstrip())


def main():
    res = divisors(n)
    print((len(str(n // res[-1]))))


if __name__ == "__main__":
    main()

+ + +def divisors(n): +    res = [] +    for i in range(1, int(n**0.5) + 1): +        if n % i: +            continue +        res.append(i) +    return res + -    a = 1 -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            a = i -    b = n // a -    ans = len(str(b)) -    return ans +    res = divisors(n) +    print((len(str(n // res[-1])))) -    ans = main() -    print(ans) +    main()