import numpy as np



n = int(eval(input()))



sqrt_n = int(round(np.sqrt(n)))



i = 0 



while True:

    if n % (sqrt_n+i) == 0:

        ans = [sqrt_n+i,int(n/(sqrt_n+i))]

        break

    

    if n % (sqrt_n-i) == 0:

        ans = [sqrt_n-i,int(n/(sqrt_n-i))]

        break

    

    i += 1



len_ans = [0,0]



len_ans[0] = len(str(ans[0])) 

len_ans[1] = len(str(ans[1])) 



print((max(len_ans)))
import math

n = int(eval(input()))



min_n = n



for i in range(1,int(math.sqrt(n))+1):

    if n % i == 0:

        a = len(str(i))

        b = len(str(int(n/i)))

        

        if min_n > max(a,b):

            min_n = max(a,b)





print(min_n)
import numpy as np

n = int(eval(input()))
sqrt_n = int(round(np.sqrt(n)))
i = 0
while True:
    if n % (sqrt_n + i) == 0:
        ans = [sqrt_n + i, int(n / (sqrt_n + i))]
        break
    if n % (sqrt_n - i) == 0:
        ans = [sqrt_n - i, int(n / (sqrt_n - i))]
        break
    i += 1
len_ans = [0, 0]
len_ans[0] = len(str(ans[0]))
len_ans[1] = len(str(ans[1]))
print((max(len_ans)))

import math

n = int(eval(input()))
min_n = n
for i in range(1, int(math.sqrt(n)) + 1):
    if n % i == 0:
        a = len(str(i))
        b = len(str(int(n / i)))
        if min_n > max(a, b):
            min_n = max(a, b)
print(min_n)

-import numpy as np +import math -sqrt_n = int(round(np.sqrt(n))) -i = 0 -while True: -    if n % (sqrt_n + i) == 0: -        ans = [sqrt_n + i, int(n / (sqrt_n + i))] -        break -    if n % (sqrt_n - i) == 0: -        ans = [sqrt_n - i, int(n / (sqrt_n - i))] -        break -    i += 1 -len_ans = [0, 0] -len_ans[0] = len(str(ans[0])) -len_ans[1] = len(str(ans[1])) -print((max(len_ans))) +min_n = n +for i in range(1, int(math.sqrt(n)) + 1): +    if n % i == 0: +        a = len(str(i)) +        b = len(str(int(n / i))) +        if min_n > max(a, b): +            min_n = max(a, b) +print(min_n)