CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))

a = 1
i = 2
while i * i <= N:
    if N % i == 0:
        a = i
    i += 1

b = N // a
print((max(len(str(a)), len(str(b)))))

# Optimized solution

N = int(eval(input()))

ans = 11
a = 1
i = 1
while i * i <= N:
    if N % i == 0:
        a = i
        b = N//a
        ans = min(ans, len(str((max(a,b)))))
    i += 1

print(ans)
# Original solution
import math
N = int(eval(input()))
A = int(math.sqrt(N))
for i in range(A, N + 1):
    if N % i == 0 or len(str(i)) == len(str(N)):
        print((len(str(i))))
        break


# Optimized solution
import math
N = int(eval(input()))
for i in range(int(math.sqrt(N)) + 1, 0, -1):
    q, m = divmod(N, i)
    if m == 0:
        print((len(str(q))))
        break
# Original solution
N = int(eval(input()))

min_f = len(str(N))
for a in range(1, N):
  if N % a != 0:
    continue
  b = int(N / a)
  f = max(len(str(a)), len(str(b)))
  if min_f > f:
    min_f = f
  if a**2 > N:
    break

print(min_f)

# Optimized solution
import math

N = int(eval(input()))

min_f = len(str(N))
for a in range(1, int(math.sqrt(N)) + 1):
  if N % a != 0:
    continue
  b = int(N / a)
  f = max(len(str(a)), len(str(b)))
  if min_f > f:
    min_f = f

print(min_f)
# Original solution
def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count+1

N = int(eval(input()))
minimum = 15
for num in range(1,int(N/(10**5))+10**5+1):
    if N % num == 0:
        minimum = min(minimum, F(num, N/num))
print(minimum)

# Optimized solution
def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count+1
 
N = int(eval(input()))
minimum = 15
for num in range(1,10**5+1):
    if N % num == 0:
        minimum = min(minimum, F(num, N/num))
print(minimum)
# Original solution
def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count+1
 
N = int(eval(input()))
minimum = 15
for num in range(1,10**5+1):
    if N % num == 0:
        minimum = min(minimum, F(num, N/num))
print(minimum)

# Optimized solution
def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count+1
 
N = int(eval(input()))
minimum = 15
for num in range(1,int(N**0.5)+1):
    if N % num == 0:
        minimum = min(minimum, F(num, N/num))
print(minimum)
# Original solution
N=int(eval(input()))
import math
rootN=math.sqrt(N)
if rootN==int(rootN):
    n=int(rootN)
else:
    for m in range(int(rootN)+1,N+1):
        if N%m==0:
            n=m
            break
print((len(str(n))))


# Optimized solution
N=int(eval(input()))
import math
rootN=math.sqrt(N)
if rootN==int(rootN):
    n=int(rootN)
else:
    for m in reversed(list(range(1,int(rootN)+1))):
        if N%m==0:
            n=int(N/m)
            break
print((len(str(n))))
# Original solution
import math
n=int(eval(input()))

a=int(math.sqrt(n))

if n%2 != a%2: a+=1
while n%a != 0:a+=2

b=int(n/a)

a_dig = len(str(a))
b_dig = len(str(b))

ans=max(a_dig,b_dig)

print(ans)


# Optimized solution
import math
n = int(eval(input()))
nn = int(math.sqrt(n))
while n%nn != 0: nn-=1
ans = len(str(n//nn))
print(ans)
# Original solution
import math
n = int(eval(input()))
nn = int(math.sqrt(n))
while n%nn != 0: nn+=1
ans = len(str(nn))
print(ans)

# Optimized solution
import math
n = int(eval(input()))
nn = int(math.sqrt(n))
while n%nn != 0: nn-=1
ans = len(str(n//nn))
print(ans)
# Original solution
N = int(eval(input()))
v = round(N ** 0.5)
while N % v != 0:
    v += 1
print((len(str(v))))

# Optimized solution
N = int(eval(input()))
v = round(N ** 0.5)
while N % v != 0:
    v -= 1
print((len(str(N // v))))
# Original solution
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)


# Optimized solution
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()
# Original solution
import sys
import itertools
input = sys.stdin.readline


def read_values():
    return list(map(int, input().split()))


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def main():
    N = int(eval(input()))
    for i in range(int(N ** 0.5), N + 1):
        if N % i == 0:
            print((len(str(i))))
            break


if __name__ == "__main__":
    main()


# Optimized solution
import sys
import itertools
input = sys.stdin.readline


def read_values():
    return list(map(int, input().split()))


def read_list():
    return list(read_values())


def read_lists(N):
    return [read_list() for n in range(N)]


def main():
    N = int(eval(input()))
    for i in range(int(N ** 0.5), 0, -1):
        if N % i == 0:
            print((len(str(N // i))))
            break


if __name__ == "__main__":
    main()
# Original solution
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)))



# Optimized solution
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()
# Original solution
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()

# Optimized solution
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import sqrt, ceil, log10
def main():
    n = int(eval(input()))
    sqrtn = ceil(sqrt(n))
    r = n
    for i1 in range(1, sqrtn + 1):
        if n % i1 == 0:
            t1 = log10(i1)
            t2 = log10(n//i1)
            t = max(t1, t2) + 1
            r = min(r, t)
    print((int(r)))

if __name__ == '__main__':
    main()
# Original solution
import math
N=int(eval(input()))
Candidate=-(-math.sqrt(N)//1)
while N%Candidate!=0:
    if Candidate>N:
        break
    Candidate+=1
print((len(str(Candidate))-2))

# Optimized solution
import math
N=int(eval(input()))
Candidate=-(-math.sqrt(N)//1)
while N%Candidate!=0:
    Candidate-=1
Candidate=N/Candidate
print((len(str(Candidate))-2))
# Original solution
import math
N = int(eval(input()))
sqrt = math.floor(math.sqrt(N))
ans = 10
for A in range(1,sqrt+1):
    n = 0
    if N % A != 0:
        continue
    B = N / A
    while not B == 0:
        n += 1
        B //= 10
    ans = min(ans, n)
print(ans)


# Optimized solution
N = int(eval(input()))
f = lambda x,y:len(str(x)) if x > y else len(str(y))
from math import floor, sqrt
ans = len(str(N))
for a in range(1,floor(sqrt(N))+1):
    if N % a == 0:
        ans = min(ans, f(a,N//a))
print(ans)
# Original solution
def func(num):
    cnt=0
    while(num>0):
        num=int(num/10)
        cnt+=1
    return cnt

N=int(eval(input()))
ans=100
for i in range(1,int(N**(1/2)+1)):
    tmp=100
    if(N%i==0):
        tmp=max(func(i),func(N/i))
    ans=min(ans,tmp)
print(ans)

# Optimized solution
#数字の桁を求める関数
def func(num):
    cnt=0
    while(num>0):
        num=int(num/10)
        cnt+=1
    return cnt

N=int(eval(input()))
ans=100
#約数全列挙 O(sqrt(N))でできるので間に合う
for i in range(1,int(N**(1/2)+1)):
    #tmpは桁数が入るので最初大きめで持っておく
    tmp=100
    if(N%i==0):
        #問題文通り比較
        tmp=max(func(i),func(N/i))
    ans=min(ans,tmp)
print(ans)
# Original solution
def countDigs(n):
	digs = 0
	while n > 0:
		digs += 1
		n = n // 10
	return digs

def digs(n):
	for i in range(int((n + 0.1) ** 0.5), int(n // 2) + 1):
		if (n % i == 0):
			print((countDigs(i)))
			return
	print((countDigs(n)))

digs(int(eval(input())))

# Optimized solution

def countDigs(n):
	digs = 0
	while n > 0:
		digs += 1
		n = n // 10
	return digs

# def calcUpperLimit(n):
# 	x = 1
# 	if (n <= x**2):
# 		return int(n // 2) + 1
# 	for i in range(x, 0, -1):
# 		if (n % x == 0):
# 			return n // x + 1
# 	return int(n // 2) + 1

# def digs(n):
# 	for i in range(int((n + 0.1) ** 0.5), calcUpperLimit(n)):
# 		if (n % i == 0):
# 			print(countDigs(i))
# 			return
# 	print(countDigs(n))

def digs(n):
	for i in range(int((n + 0.1) ** 0.5), 0, -1):
		if n % i == 0:
			print((countDigs(n // i)))
			return

digs(int(eval(input())))
# Original solution
n=int(eval(input()))

ans=10**5
x=int(n**0.5)
for i in range(x,0,-1):
  if n%i==0:
    y=n//i
    ans=min(ans,len(str(y)))

print(ans)

# Optimized solution
n=int(eval(input()))

x=int(n**0.5)
for i in range(x,0,-1):
  if n%i==0:
    y=n//i
    print((len(str(y))))
    exit()
# Original solution
import math
n=int(eval(input()))
ans=10
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        b=int(n/i)
        f=max(len(str(i)),len(str(b)))
        ans=min(f,ans)
print(ans)

# Optimized solution
import math
n=int(eval(input()))
ans=100
for a in range(1,int(math.sqrt(n))+1):
    if n%a==0:
        m=max(len(str(a)),len(str(n//a)))
        ans=min(ans,m)
print(ans)
# Original solution
import math
n=int(eval(input()))
lim=math.ceil(math.sqrt(n))
cnt=0
rec=0

for i in range(lim, n+1):
  if n%i==0:
    print((len(str(i))))
    exit()
  if n%(i+1-lim)==0 and cnt==0:
    rec=n/(i+1-lim)
    cnt+=1
  if i>=rec:
    print((len(str(rec))))
    exit()

# Optimized solution
n=int(eval(input()))
l=int((n**0.5))+1
ans=n
for i in range(1, l+1):
  if n%i==0:
    ans=min(ans, len(str(n//i)))
print(ans)
# Original solution
import math

n = int(eval(input()))
a = int(math.sqrt(n))

for i in range(a, n + 1):
    if n % i == 0:
        print((len(str(i))))
        exit()



# Optimized solution
import math

n = int(eval(input()))
a = int(math.sqrt(n))

for i in range(a + 1, 0, -1):
    if n % i == 0:
        # print(n // i, i)
        print((max(len(str(i)), len(str(n // i)))))
        exit()
# Original solution
import math

N = int(eval(input()))

def cnt_digits(N):
    ctr = 0
    while N>0:
        N = int(N/10)
        ctr += 1

    return ctr

ans = cnt_digits(N)

for i in range(1, int(math.sqrt(N)+1)):
    if N%i != 0: continue
    B = int(N/i)
    cur = max(cnt_digits(i),cnt_digits(B))

    if (ans>cur):
        ans=cur
print(ans)


# Optimized solution
import math
N=int(eval(input()))
ans=len(str(N))
for A in range(1, int(math.sqrt(N)+1)):
    if N%A != 0: continue
    B = int(N/A)
    cur = max(len(str(A)),len(str(B)))
    ans = min(ans,cur)
print(ans)
# Original solution
def main():
    n = int(eval(input()))
    m = 1
    k = int(n ** 0.5)

    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)

    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
def main():
    n = int(eval(input()))
    m = 1
    k = int(n ** 0.5)

    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)
            break

    print(ans)


if __name__ == '__main__':
    main()
# Original solution
#n 10**10
#sqrtn 10**5
ans=10**6
n=int(eval(input()))
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    ans=min(len(str(n//i)),ans)
    
print(ans)

# Optimized solution
def F(a,b):
  return max(len(str(a)),len(str(b)))
n=int(eval(input()))
ans=10**15
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    a=i
    b=n//i
    
    ans=min(ans,F(a,b))

print(ans)
# Original solution
n = int(eval(input()))
min_f = 10
for i in range(1, n + 1):
    if i ** 2 > n:
        break
    if n % i != 0:
        continue
    min_seq = max(len(str(i)), len(str(n // i)))
    if min_seq < min_f:
        min_f = min_seq
print(min_f)

# Optimized solution
n = int(eval(input()))
n_sqrt = int(n ** 0.5) + 1
ans = float('inf')
for i in range(1, n_sqrt + 1):
    if n % i == 0:
        j = int(n // i)
        max_len = max(len(str(i)), len(str(j)))
        ans = min(max_len, ans)
print(ans)
# Original solution
import math

# input
N = int(eval(input()))

i = int(math.sqrt(N))

while i > 0:
    if N % i == 0:
        print((len(str(N // i))))
        break
    else:
        i -= 1

# Optimized solution
import math

# input
N = int(eval(input()))

i = int(math.sqrt(N))

while i:
    if N % i == 0:
        print((len(str(N // i))))
        break
    else:
        i -= 1
# Original solution
n=int(eval(input()))
import math
ans=[]
ans_i=[]
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        ans.append(i)
        ans_i.append(n//i)
v=max(ans[0],ans_i[0])
x=max(ans[-1],ans_i[-1])
print((len(str(min(v,x)))))

# Optimized solution
n=int(eval(input()))
a=[]
b=[]
import math
for i in range(1,math.ceil(math.sqrt(n)+1)):
    if n%i==0:
        a.append(i)
        b.append(n//i)
c=[]
for i in range(len(a)):
    c.append(max(a[i],b[i]))
d=str(min(c))
print((len(d)))
# Original solution
# C - Digits in Multiplication
N = int(eval(input()))

A = int(N**0.5)
ans = 1
for i in range(A,N):
    if N % i == 0:
        ans = len(str(i))
        break
    else:
        ans = len(str(i))

print(ans)

# Optimized solution
# C - Digits in Multiplication
N = int(eval(input()))

A = int(N**0.5)
# print(A)
ans = 1
for i in range(A,0,-1):
    if N % i == 0:
        tmp = N / i
        ans = len(str(int(tmp)))
        break
    else:
        pass

print(ans)
# Original solution
n = int(eval(input()))

import math
root = math.ceil(math.sqrt(n))

for i in range(n):
    if n%(root+i)==0:
        print((len(str(root+i))))
        break



# Optimized solution
n = int(eval(input()))

import math
root = math.ceil(math.sqrt(n))

for i in range(1,root+1):
    if n%i==0:
        ans = n//i
print((len(str(ans))))
# Original solution
from math import sqrt
n=int(eval(input()))
ans=[]
k=int(sqrt(n))
for i in range(1,k+1):
    if n%i==0:
        ans.append(len(str(int(n/i))))
ans.sort()
print((ans[0]))

# Optimized solution
def c(num):
    cnt=0
    while num>0:
        num//=10
        cnt+=1
    return cnt

def main():
    n=int(eval(input()))
    ans=10**10
    for i in range(1,int(n**0.5)+1):
        if n%i!=0:
            continue
        b=n//i
        ret=max(c(i),c(b))
        if ans>ret:
            ans=ret
    print(ans)

main()
# Original solution
import math
n = int(eval(input()))
m = math.ceil(math.sqrt(n))

min_f = float('inf')

for i in range(1, m+1):
  x = n/i
  if x.is_integer():
    x = int(x)
    i = int(i)
    f = max(len(str(i)), len(str(x)))
    if min_f > f:
      min_f = f
print(min_f)


# Optimized solution
n = int(eval(input()))

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    #divisors.sort(reverse=True)
    return divisors

d = make_divisors(n)
ans = 10**18
for a in d:
    b = n//a
    a = str(a)
    b = str(b)
    ans = min(ans, max(len(a), len(b)))
print(ans)
# Original solution
N = int(eval(input()))

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,N+1):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
#        print(A, B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)


# Optimized solution
import math

N = int(eval(input()))

ans1 = 0

A = '1'
B = str(N)

if len(A)>=len(B):
    ans = len(A)
else:
    ans = len(B)
    
for i in range(2,int(math.sqrt(N)+1)):
    A = i
    if N%A==0:
        B = int(N / A)
        A = str(A)
        B = str(B)
#        print(A, B)
        if len(A)>=len(B):
            ans1 = len(A)
        else:
            ans1 = len(B)
        if ans1 <= ans:
            ans = ans1
    if len(str(A))==len(str(B)):
        break
print(ans)
# Original solution
n = int(eval(input()))

element = []
i = 1
while  i * i <= n:
    if n % i == 0:
        element.append([len(str(i)),len(str(n//i))])
    i += 1
ans = max(element[0][0],element[0][1])
for i in range(len(element)):
    ans = min(max(element[i][0],element[i][1]),ans)
print(ans)

# Optimized solution
n = int(eval(input()))

e = []
i = 1
while i * i <= n:
    if n % i == 0:
        e.append([str(i),str(n//i)])
    i += 1

ans = 10**9
for i in range(len(e)):
    ans = min(max(len(e[i][1]),len(e[i][0])),ans)
print(ans)
# Original solution
import math
n = int(eval(input()))
for i in range(int(math.sqrt(n)),n+1,1):
    if n%i==0:
        break
print((len(str(i))))


# Optimized solution
import math
n = int(eval(input()))
for i in range(int(math.sqrt(n)),0,-1):
    if n%i==0:
        a=n//i
#        print(i)
        print((max(len(str(i)),len(str(a)))))
        break
# Original solution
n=int(eval(input()))
l=[]
t=int(n**0.5)
while len(l)==0:
    if n%t==0:
        l.append((t,n//t))
    t+=1
x,y=l[0][0],l[0][1]
ans=max(len(list(str(x))),len(list(str(y))))
print(ans)

# Optimized solution
n=int(eval(input()))
l=[]
t=int(n**0.5)
while len(l)==0:
    if n%t==0:
        l.append((t,n//t))
    t-=1
x,y=l[0][0],l[0][1]
ans=max(len(list(str(x))),len(list(str(y))))
print(ans)
# Original solution
def f(a,b):
  return max(len(str(a)),len(str(b)))

N = int(eval(input()))
n = N
ans = N

for _ in range(1,int(n/2)+1):
  if n % _ == 0:
#    print("{}: {} {}".format(f(_,N/_),_,int(N/_)))
    if ans >= f(_,int(N/_)):
      ans = f(_,int(N/_))
    else:
      break
print(ans)

# Optimized solution
import math
def f(a,b):
  return max(len(str(a)),len(str(b)))

N = int(eval(input()))
n = N
ans = N

for _ in range(1,int(math.sqrt(n))+1):
  if n % _ == 0:
#    print("{}: {} {}".format(f(_,N/_),_,int(N/_)))
    if ans >= f(_,int(N/_)):
      ans = f(_,int(N/_))
    else:
      break
print(ans)
# Original solution
N=int(eval(input()))
ans=10

for A in range(1,int(N**0.5)+1):
    if N/A==int(N/A):
        ans=min(ans,len(str(int(N/A))))

print(ans)

# Optimized solution
N = int(eval(input()))


def F(A, B):
    return max(len(str(A)), len(str(B)))


ans = 10**30
for i in range(1, int(N**0.5)+1):
    if N % i == 0:
        ans = min(ans, F(i, N//i))
print(ans)
# Original solution
n=int(eval(input()));ans=10
for i in range(min(10**5,n)):
  if n%(i+1)==0:ans=min(ans,max(len(str(i+1)),len(str(n//(i+1)))))
print(ans)

# Optimized solution
n=int(eval(input()))
ans=inf=float('inf')
for i in range(1,int(n**0.5)+1):
  if n%i:continue
  ans=max(len(str(n%i)),len(str(n//i)))
print(ans)
# Original solution
import math
n = int(eval(input()))
k = int(math.sqrt(n))
for i in range(k,n+1):
  if n%i == 0:
    a = i
    break
s = len(str(a))
print(s)

# Optimized solution
import math
n = int(eval(input()))
k = int(math.sqrt(n))
for i in range(k+2,0,-1):
  if n%i == 0:
    a = n//i
    break
s = len(str(a))
print(s)
# Original solution
n=int(eval(input()))
ans=float('inf')
for i in range(1,int(n**0.5)+1):
    if n%i ==0:
        x=len(str(i))
        y=len(str(n//i))
        z=max(x,y)
    if ans > z:
        ans=z
print(ans)

# Optimized solution
n=int(eval(input()))
ans=float('inf')
for i in range(1,int(n**0.5)+1):
    if n%i == 0:
        x=len(str(i))
        y=len(str(n//i))
        z=max(x,y)
        ans=min(z,ans)
print(ans)
# Original solution
n = int(eval(input()))

def is_prime(n):
    if n <= 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n%i == 0:
            return False
    return True

if is_prime(n):
    ans = len(str(n))
else:
    x = int(n**0.5)
    while n%x!=0:
        x += 1
    y = n//x
    ans = max(len(str(x)), len(str(y)))
print(ans)

# Optimized solution
n = int(eval(input()))
x = round(n**0.5)

while n%x!=0:
    x -= 1
y = n//x
print((len(str(max(x,y)))))
# Original solution
n = int(eval(input()))
x = int(n**0.5)

while n%x!=0:
    x += 1
y = n//x
print((len(str(max(x,y)))))

# Optimized solution
n = int(eval(input()))

x = int(n**0.5)
while n%x != 0:
    x -= 1
print((max(len(str(x)), len(str(n//x)))))
# Original solution
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)

# Optimized solution
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()
# Original solution
import math

N = int(eval(input()))
p, q, r = 1, 1, N
if N % 2 == 0:
    p = 2
    q = 3
n = int(math.sqrt(N))
while q <= n:
    if N % q == 0:
        p = q
    q += 1
num = str(max(p, N//p))

ans = len(num)
print(ans)

# Optimized solution
import math

N = int(eval(input()))
p, q, r = 1, 1, N
if N % 2 == 0:
    p = 2
    q = 3
n = int(math.sqrt(N))
while q <= n:
    if N % q == 0:
        p = q
    q += 1
ans = len(str(N//p))

print(ans)
# Original solution
from math import sqrt

N = int(eval(input()))

n = int(sqrt(N)) + 10
def f(A, B):
    a = len(str(A))
    b = len(str(B))
    return max(a, b)


ans = 10 ** 10
for i in range(1, n):
    if (N//i) * i == N:
        ans = min(ans, f(i, N//i))

print (ans)

# Optimized solution
N = int(eval(input()))

def make_divisors(n):
    import math
    divisors = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0: #割り切れるとき
            divisors.append(i)
            if i != n//i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

def F(A, B):
    return max(len(str(A)), len(str(B)))


lst = make_divisors(N)

ans = 10 ** 18
for a in lst:
    b = N // a
    ans = min(ans, F(a, b))

print (ans)
# Original solution
n = int(eval(input()))
if n == 1:
    print((1))
    exit()
a = 1
b = n
for i in range(1, 10**10):
    if n % i == 0:
        if i > n // i:
            print((min(len(str(i)), len(str(b)))))
            exit()
        a = i
        b = n // i

# Optimized solution
n = int(eval(input()))
if n == 1:
    print((1))
    exit()
a = 1
b = n
for i in range(1, 10**5):
    if n % i == 0:
        if i > n // i:
            print((min(len(str(i)), len(str(b)))))
            exit()
        a = i
        b = n // i
print((len(str(b))))
# Original solution
n = int(eval(input()))
tmp = n
for x in range(1, n+1):
    y = n//x
    if x > y:
        break
    if n % x == 0:
        tmp = y
ans = len(str(tmp))
print(ans)

# Optimized solution
N = int(eval(input()))
answer = 10**10
M = int(N**0.5)+1

for a in range(1,M):
    if N%a==0:
        b = N//a
        F = max(len(str(a)),len(str(b)))
        answer = min(answer,F)
print(answer)
# Original solution
def func(i, j):
  il = len(str(i))
  jl = len(str(j))
  if il > jl:
    return il
  return jl

n = int(eval(input()))
min = len(str(10**10))
for i in range(1, n+1):
  if n % i == 0:
    if i > n/i:
      break
    fr = func(i, int(n/i))
    if min > fr:
      min = fr
print(min)


# Optimized solution
def func(i, j):
  il = len(str(i))
  jl = len(str(j))
  if il > jl:
    return il
  return jl

n = int(eval(input()))
min = len(str(n))
for i in range(1, n+1):
  if i**2 > n:
    break
  if n % i == 0:
    fr = func(i, int(n/i))
    if min > fr:
      min = fr
print(min)