from itertools import combinations

from functools import reduce

from operator import mul

def prime_dec(n):

  i = 2

  table = []

  while i * i <= n:

    while n % i == 0:

      n /= i

      table.append(int(i))

    i += 1

  if n > 1:

    table.append(n)

  return table



n = int(eval(input()))

ps = prime_dec(n)

ps = [1] if len(ps) == 0 else ps

ps_com = []

for i in range(len(ps)):    

    ps_com += set(combinations(ps, i+1))

divs = [reduce(mul, k) for k in ps_com if not len(k) == 0]

divs_twin = [(k, int(n/k)) for k in divs]

divs_twin = set(divs_twin)

divs_twin_len = [max(len(str(k[0])) ,len(str(k[1])))  for k in divs_twin]



print((min(divs_twin_len)))



from math import floor



def main():

    n = int(eval(input()))

    nsq = floor(n ** 0.5)

    r = 11

    for nsqe in range(nsq, 0, -1):

        if n % nsqe == 0:

            rt = max(len(str(nsqe)), len(str(n // nsqe)))

            r = min(r, rt)

    print(r)



if __name__ == '__main__':

    main()
from itertools import combinations
from functools import reduce
from operator import mul


def prime_dec(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(int(i))
        i += 1
    if n > 1:
        table.append(n)
    return table


n = int(eval(input()))
ps = prime_dec(n)
ps = [1] if len(ps) == 0 else ps
ps_com = []
for i in range(len(ps)):
    ps_com += set(combinations(ps, i + 1))
divs = [reduce(mul, k) for k in ps_com if not len(k) == 0]
divs_twin = [(k, int(n / k)) for k in divs]
divs_twin = set(divs_twin)
divs_twin_len = [max(len(str(k[0])), len(str(k[1]))) for k in divs_twin]
print((min(divs_twin_len)))

from math import floor


def main():
    n = int(eval(input()))
    nsq = floor(n**0.5)
    r = 11
    for nsqe in range(nsq, 0, -1):
        if n % nsqe == 0:
            rt = max(len(str(nsqe)), len(str(n // nsqe)))
            r = min(r, rt)
    print(r)


if __name__ == "__main__":
    main()

-from itertools import combinations -from functools import reduce -from operator import mul +from math import floor -def prime_dec(n): -    i = 2 -    table = [] -    while i * i <= n: -        while n % i == 0: -            n /= i -            table.append(int(i)) -        i += 1 -    if n > 1: -        table.append(n) -    return table +def main(): +    n = int(eval(input())) +    nsq = floor(n**0.5) +    r = 11 +    for nsqe in range(nsq, 0, -1): +        if n % nsqe == 0: +            rt = max(len(str(nsqe)), len(str(n // nsqe))) +            r = min(r, rt) +    print(r) -n = int(eval(input())) -ps = prime_dec(n) -ps = [1] if len(ps) == 0 else ps -ps_com = [] -for i in range(len(ps)): -    ps_com += set(combinations(ps, i + 1)) -divs = [reduce(mul, k) for k in ps_com if not len(k) == 0] -divs_twin = [(k, int(n / k)) for k in divs] -divs_twin = set(divs_twin) -divs_twin_len = [max(len(str(k[0])), len(str(k[1]))) for k in divs_twin] -print((min(divs_twin_len))) +if __name__ == "__main__": +    main()