# coding: utf-8

# Your code here!

import math

N=int(eval(input()))

n=int(math.sqrt(N))

dev=0

for i in range(1,n+1):

    if N%i==0:

        dev=i

print((max(len(str(dev)),len(str(N//dev)))))
#codng utf-8

import math

N=int(eval(input()))

n=int(math.sqrt(N))

for i in range(n,0,-1):

    if N%i==0:

        ans=max(len(str(i)),len(str(N//i)))

        break

print(ans)
# coding: utf-8
# Your code here!
import math

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

# codng utf-8
import math

N = int(eval(input()))
n = int(math.sqrt(N))
for i in range(n, 0, -1):
    if N % i == 0:
        ans = max(len(str(i)), len(str(N // i)))
        break
print(ans)

-# coding: utf-8 -# Your code here! +# codng utf-8 -dev = 0 -for i in range(1, n + 1): +for i in range(n, 0, -1): -        dev = i -print((max(len(str(dev)), len(str(N // dev))))) +        ans = max(len(str(i)), len(str(N // i))) +        break +print(ans)