CodeEff/ECCO huggingface dataset:
# Original solution
import math
N = int(eval(input()))
ans = float("inf")
for i in range(1, math.ceil(math.sqrt(N)) + 1):
	if N % i == 0:
		tmp = max(len(str(i)), len(str(N // i)))
		ans = min(ans, tmp)
print(ans)


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

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

N = int(eval(input()))
divs = make_divisors(N)
ans = 10**10
for A in divs:
    B = N//A
    ans = min(ans, F(A, B))
print(ans)
# Original solution
N=int(eval(input()))
M=int((N**(1/2)))
mult=0
while 1:
    for i in [-1,1]:
        x=M+i*mult
        if not N%x:
            print((max([len(str(x)),len(str(int(N/x)))])))
            exit()
    mult+=1


# Optimized solution
N=int(eval(input()))
M=int((N**(1/2)))
print((min([max([len(str(i)),len(str(int(N/i)))]) for i in range(1,M+1) if N%i==0])))
# Original solution
N = int(eval(input()))

for i in range(int(0 - N ** .5 // -1),1,-1):
    if N % i == 0:
        print((len(str(N // i))))
        exit()
print((len(str(N))))

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

for i in range(int(N**0.5//1+1),1,-1):
    if N % i == 0:
        print((len(str(N // i))))
        exit()
print((len(str(N))))
# Original solution
import math
n = int(eval(input()))
ans = int(math.sqrt(n))
while True:
  if n % ans == 0:
    break
  else:
    ans += 1
print((len(str(ans))))

# Optimized solution
import math
n = int(eval(input()))
ans = int(math.sqrt(n))
while True:
  if n % ans == 0:
    ans = n // ans
    break
  else:
    ans -= 1
print((len(str(ans))))
# Original solution
n = int(eval(input()))

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**6+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    # print(m)
print(m)

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

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**5+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    # print(m)
print(m)
# Original solution
import math
n=int(eval(input()))
f=[]
for a in range(1,math.floor(n**(1/2))+1):
    if n%a==0:
        b=n//a
        f.append(len(str(b)))
print((min(f)))

# Optimized solution
import math
n=int(eval(input()))
f=[]
for a in range(1,math.floor(n**(1/2))+1):
    if n%a==0:
        f.append(len(str(n//a)))
print((min(f)))
# Original solution
n = int(eval(input()))

ans = 10

def F(a,b):
	return max(len(str(a)),len(str(b)))

i = 1
while i * i <= n:
	if n%i == 0:
		ans = min(ans,F(i,n//i))	
		#print(i,n//i)
	i += 1
print(ans)


# Optimized solution
import math
n = int(eval(input()))
s = int(math.sqrt(n))

ans = 10**11

for i in range(1,s+1):
    if n%i == 0:
        z = n//i
        ans = min(ans,len(str(z)))
print(ans)
# Original solution
n = int(eval(input()))
ans = 11
for i in range(1, int(-(-n**.5//1))+1):
    x, r = divmod(n, i)
    if r == 0:
        ans = min(ans, max([len(str(x)) for x in (i, x)]))
print(ans)

# Optimized solution
n = int(eval(input()))
INF = 10**18
ans = INF


def F(a, b):
    return max(len(str(a)), len(str(b)))


for i in range(1, int(n**.5)+1):
    if n % i == 0:
        x = F(i, n//i)
        if x < ans:
            ans = x
print(ans)
# Original solution
N = int(eval(input()))

def f(a, b):
  return len(list(a)) if len(list(a)) > len(list(b)) else len(list(b))

min_x = len(list(str(N)))

for i in range(1, N // 2 + 1):
  if N % i == 0:
    min_x = min(min_x, f(str(i), str(N // i)))
    if len(str(i)) >= len(str(N // i)):
      break
print(min_x)


# Optimized solution
import math

def f(a, b):
  return len(list(str(max(a, b))))

N = int(eval(input()))

ans = len(str(N))
for i in range(1, int(math.sqrt(N)) + 1):
  if N % i == 0:
    ans = min(ans, f(i, N // i))
print(ans)
# Original solution
import math


def divisor(div, N):
    # 約数
    i = 1
    n = N

    while i <= math.sqrt(n):
        if n % i == 0:
            div.append([i, n // i])
        i += 1


def main():
    N = int(eval(input()))
    div = []
    divisor(div, N)
    print((max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1))))
    return


main()


# Optimized solution
import math


def divisor(div, n):
    # 約数
    ini = 1 if n % 2 else 2
    for i in range(ini, int(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            div.append([i, n // i])


def main():
    N = int(eval(input()))
    div = []
    divisor(div, N)
    print((max(int(math.log10(div[-1][0]) + 1),
              int(math.log10(div[-1][1]) + 1))))
    return


main()
# Original solution
import math

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

# Optimized solution
import math

n=int(eval(input()))
for i in range(int(math.sqrt(n)),0,-1):
    if n%i==0:print((max(len(str(i)),len(str(n//i)))));break
# Original solution
import math
N = int(eval(input()))
ans = len(str(N))
for i in range(2, int(math.sqrt(N)) + 1):
    if N % i == 0:
        ans = min(ans, len(str(N // i)))
print(ans)

# Optimized solution
from math import ceil

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

n = int(eval(input()))
divs = divisors(n)
divs.sort()
lim = ceil(len(divs) / 2)
ans = 11

for i in range(lim):
    a = divs[i]
    b = divs[(-1) * (i + 1)]
    f = max(len(str(a)), len(str(b)))
    ans = min(ans, f)

print(ans)
# Original solution
N = int(eval(input()))
ans = N
pred = N
for i in range(1, N//2):
    d = 0
    if N % i == 0:
        d = max(len(str(i)), len(str(N//i)))
        ans = min(ans, d)
        if d > pred:
            break
        pred = d
print(ans)

# Optimized solution
N = int(eval(input()))
ans = N
for i in range(1, N):
    if i**2 > N:
        break
    d = 0
    if N % i == 0:
        d = max(len(str(i)), len(str(N//i)))
        ans = min(ans, d)
print(ans)
# Original solution
import math

def F(A,B):
    if A > B:
        return len(str(A))
    else:
        return len(str(B))
            

N = int(eval(input()))
min = F(1,N)
rt = int(math.sqrt(N))
for i in range(rt,N+1):
    if N % i != 0:
        continue
    f = F(i,int(N/i))
    if f < min:
        min = f
        break
print(min)

# Optimized solution
import math

def F(A,B):
    if A > B:
        return len(str(A))
    else:
        return len(str(B))
            

N = int(eval(input()))
min = F(1,N)
rt = int(math.sqrt(N))
for i in range(2,rt+1):
    if N % i != 0:
        continue
    f = F(i,int(N/i))
    if f < min:
        min = f
print(min)
# Original solution
N = int(eval(input()))
def is_square(n):
    m = int(n**.5)
    return True if abs(m*m - n) < 1e-6 else False
divs = []
f = False
if is_square(N):
    divs = [int(N**.5)]*2
    f = True
for i in range(int(N**.5),0,-1):
    if f: break
    if N % i == 0: divs += [i, N//i]
    if len(divs) >= 2: break
print((max([len(str(x)) for x in divs])))

# Optimized solution
n = int(eval(input()))
sn = int(n**.5)
if (sn)*(sn)==n:
    print((len(str(sn))))
    quit()

divisors = []
c = 0
for i in range(int(n**.5)+1, 0, -1):
    if n % i == 0:
        divisors.append(i)
        c += 1
        if i != n // i:
            divisors.append(n//i)
            c += 1
    if c >= 2:
        break

print((len(str(max(divisors)))))
# Original solution
import sys
import math

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

a = math.ceil(math.sqrt(n))
for i in range(a, n+1):
    if n % i == 0:
        m1 = i
        m2 = int(n/i)
        break
    else:
        continue

ord1 = int(math.log10(m1) + 1)
ord2 = int(math.log10(m1) + 1)
ans = max(ord1, ord2)
print(ans)


# Optimized solution
import sys
import math

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

a = math.ceil(math.sqrt(n))

ans = 10
i = a
while i > 0:
    if n % i == 0:
        m1 = i
        m2 = int(n/i)

        m = max(m1, m2)
        ord_m = int(math.log10(m) + 1)
        ans = min(ans, ord_m)
    i -= 1

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

for a in range(1, n+1):
  if n % a == 0:
    if len(str(a)) <= len(str(int(n/a))):
      lis.append(max(a, int(n/a)))
    else:
      break

print((len(str(min(lis)))))

# Optimized solution
n = int(eval(input()))
lis = []

for a in range(1, int(n**0.5)+1):
  if n % a == 0:
    lis.append(max(a, int(n/a)))

print((len(str(min(lis)))))
# Original solution
import math
N = int(eval(input()))
for i in range(math.ceil(N**.5), N+1):
  if N%i == 0:
    print((len(str(i))))
    break

# Optimized solution
N = int(eval(input()))
P = [i for i in range(1, int(N**.5)+1)][::-1]
for i in P:
  if N%i == 0:
    print((len(str(N//i))))
    break
# Original solution
import math
N = int(eval(input()))
n = math.floor(math.sqrt(N))
i=0
while True:
  if N%(n+i) == 0:
    print((len(str((n+i)))))
    exit()
  else: i+=1

# Optimized solution
import math
N = int(eval(input()))
n = math.floor(math.sqrt(N))
for i in range(n):
  if N%(n-i) == 0:
    print((len(str(N//(n-i)))))
    exit()
# Original solution
N = int(eval(input()))
min_len = len(str(N))
for i in range(1, int(N ** (1/2)) + 1) :
    if N % i == 0 :
        min_len = min(min_len, max(len(str(i)), len(str(int(N/i)))))
        
print(min_len)

# Optimized solution
import math

N = int(eval(input()))

def f(a, b): 
    return max(len(str(a)), len(str(b)))
    
max_len = 0

for i in range(1, int(math.sqrt(N)) + 1) :
    if N % i == 0 :
        max_len = f(i, N // i)
        
print(max_len)
# Original solution
N=int(eval(input()))

count=0
lis=[]


for i in range(1,N+1):
	if N/i==N//i:
		if N/i < i:
			break
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print((min(llis)))

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

count=0
lis=[]


for i in range(1,N+1):
	if N/i < i:
		break
	if N/i==N//i:
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print((min(llis)))
# Original solution
import math
N=int(eval(input()))
# rootを求める
root_n = int(math.sqrt(N))
up_n = root_n
up_ans = 0
keta = lambda x: len(str(x))
while up_n <= N:
  if N % up_n == 0:
    pair = int(N/up_n)
    # 桁数を求める
    up_ans = max(keta(pair), keta(up_n))
    break
  else:
    up_n+=1

print(up_ans)



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

import math
N=int(eval(input()))
INF = 3000000
# rootを求める
# 二分探索すればいいのか！！！
ans = INF
pairs = make_divisors(N)
keta = lambda x: len(str(x))
for pair in pairs:
  tmp_ans = max(keta(pair), keta(int(N/pair)))
  ans = min(ans,tmp_ans)

print(ans)

# root_n = int(math.sqrt(N))
# up_n = root_n
# up_ans = 0

# while up_n <= N:
#   if N % up_n == 0:
#     pair = int(N/up_n)
#     # 桁数を求める
    
#     break
#   else:
#     up_n+=1

# print(up_ans)
# Original solution
import math
n = int(eval(input()))
if n < 10:
    print((1))
else:
    a = 0
    for i in range(1, int(math.sqrt(n))+1):
        if n % i == 0:
            a = i
    b = n//a
    j = 1
    while True:
        m = b / (10**j)
        if m>=1 and m<10:
            ans = j+1
            break
        j+=1

    print(ans)

# Optimized solution
import math
n = int(eval(input()))
a = 0
for i in range(1, int(math.sqrt(n))+1):
    if n % i == 0:
        a = i
b = n//a
j = 0
while True:
    m = b / (10**j)
    if m>=1 and m<10:
        ans = j+1
        break
    j+=1

print(ans)
# Original solution

iN = int(eval(input()))
iLim = int(iN**0.5) + 1

iMinMax = len(str(iN))
for i in range(iLim+1,0,-1):
    if iN % i == 0:
        iMax = len(str(max(i,iN//i)))
        if iMinMax < iMax :
            print(iMinMax)
            exit()
        else:
            iMinMax = iMax
print(iMinMax)


# Optimized solution
def 解():
    iN = int(eval(input()))
    iLim = int(iN**0.5) + 1

    iMinMax = len(str(iN))
    for i in range(iLim+1,0,-1):
        if iN % i == 0:
            iMax = len(str(max(i,iN//i)))
            if iMinMax < iMax :
                print(iMinMax)
                exit()
            else:
                iMinMax = iMax
    print(iMinMax)
解()
# Original solution
n = int(eval(input()))
i = 1
divisor = (1 + n) // 2
min_value = 10 ** 10 + 1
while i <= divisor:
    if n % i == 0:
        divisor = min(n // i, divisor)
        if max(len(str(i)),len(str(n // i))) > min_value:
            break
        min_value = min(min_value,max(len(str(i)),len(str(n // i))))
    i += 1
print(min_value)


# Optimized solution
n = int(eval(input()))
i = 1
divisor = n ** 0.5
min_value = 10 ** 10 + 1
while i < divisor + 1:
    if n % i == 0:
        min_value = min(min_value,max(len(str(i)),len(str(n // i))))
    i += 1
print(min_value)
# Original solution
N = int(eval(input()))
x = round(N**0.5)
while N%x != 0:
  x -= 1
print((len(str(N//x))))

# Optimized solution

import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
na = lambda : list(map(int, stdin.readline().split()))
ni = lambda : int(ns())
def main():
  n = ni()
  if n == 1:
    print((1))
    return
  nagasa = lambda x: len(str(x))
  def f(a, b):
    x = nagasa(a)
    y = nagasa(b)
    return x if x > y else y

  def divi(n):
    res = []
    for i in range(1, int(n**0.5)+1):
      if n % i == 0:
        res.append(i)
        if i != n // i:
          res.append(n // i)
    return res
  x = divi(n)
  ans = 1e9
  for a in x:
    b = n // a
    ans = min(ans, f(a, b))
  print(ans)

main()
# Original solution
N = int(eval(input()))
ans = 10
for n in range(1, N+1):
    q, r = divmod(N, n)
    if n > q:
        break
    if r == 0:
        d = max(len(str(n)), len(str(q)))
        if ans > d:
            ans = d
print(ans)


# Optimized solution
N = int(eval(input()))
print((min([len(str(N//n)) for n in range(1, int(N**0.5) + 1) if N % n < 1])))
# Original solution
n=int(eval(input()))
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==3:
    break
print((min(l)))

# Optimized solution
n=int(eval(input()))
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==2:
    break
print((min(l)))
# Original solution
n=int(eval(input()))
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==2:
    break
print((min(l)))

# Optimized solution
n=int(eval(input()))
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
    break
print((min(l)))
# Original solution
n=int(eval(input()))
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
    break
print((min(l)))

# Optimized solution
n=int(eval(input()))
a=0
l=[]
for i in range(int(n**(1/2))+1)[:0:-1]:
  if n%i==0:
    a+=1
    l.append(max(len(str(i)),len(str(n//i))))
  if a==3:break
print((min(l)))
# Original solution
n=int(eval(input()))
a=0
l=[]
for i in range(int(n**(1/2))+1)[:0:-1]:
  if n%i==0:
    a+=1
    l.append(max(len(str(i)),len(str(n//i))))
  if a==3:break
print((min(l)))

# Optimized solution
from math import sqrt
n=int(eval(input()))
for i in range(int(sqrt(n)),0,-1):
  if n%i==0:
    print((max(len(str(i)),len(str(n//i)))))
    exit()
# Original solution
N = int(eval(input()))

yaku = []

for i in range(1, N+1):
    if N % i == 0:
        if i in yaku:
            break
        if N/i <= i:
            yaku.append(i)
            break
        yaku.append(i)
        yaku.append(int(N/i))
yaku.sort()
ans = str(yaku[len(yaku)//2])
print((len(ans)))


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

yaku = []

for i in range(1, N+1):
    if N % i == 0:
        if i in yaku:
            break
        if N/i <= i:
            yaku.append(i)
            break
        yaku.append(i)
        yaku.append(N//i)
    elif N/i < i:
        break

yaku.sort()
ans = str(yaku[len(yaku)//2])
print((len(ans)))
# Original solution
import math

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

n=int(eval(input()))
if is_prime(n):
    print((len(str(n))))
    exit()

ns=int(math.sqrt(n)//1)

for i in range(ns,n+1):
    a=n/i
    if a%1==0:
        s=i
        break
s=str(s)
print((len(s)))

# Optimized solution
from math import sqrt
n=int(eval(input()))
sn=int(sqrt(n)//1)

for i in range(sn,0,-1):
    if n%i==0:
        s=n//i
        break
    
print((len(str(s))))
# Original solution
import math
n = int(eval(input()))
s = int(math.sqrt(n))

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

# Optimized solution
import math
n = int(eval(input()))
s = int(math.sqrt(n))

for i in range(s,0,-1):
    if n%i == 0:
        print((max(len(str(i)),len(str(n//i)))))
        exit()
# Original solution
import sys
N=int(eval(input()))
ans=[]
if N==1:
    print((1))
    sys.exit()
for i in range(int(N**0.5)-1,N+1):
    if N%i==0:
        a=str(i)
        print((len(a)))
        sys.exit()

# Optimized solution
import sys
N=int(eval(input()))
ans=[]
if N==1:
    print((1))
    sys.exit()

for i in range(int(N**0.5),0,-1):
    if N%i==0:
        a=str(N//i)
        print((len(a)))
        sys.exit()
# Original solution
from collections import defaultdict

n = int(eval(input()))
fact = defaultdict(int)
fact[1] = 1
f = 2
k = n
while f * f <= min(k * k, n):
    if k % f == 0:
        fact[f] += 1
        k //= f
    else:
        f += 1
if k > 1:
    fact[k] += 1


def digits(n):
    ret = 0
    while n > 0:
        ret += 1
        n //= 10
    return ret


def dfs(index, mul, fact):
    if index >= len(fact):
        return max(digits(mul), digits(n // mul))
    k, v = fact[index]
    ret = 10
    for i in range(v + 1):
        ret = min(ret, dfs(index + 1, mul * pow(k, i), fact))
    return ret


print((dfs(0, 1, list(fact.items()))))

# Optimized solution
n = int(eval(input()))
ans = 10
i = 1


def dig(n):
    ret = 0
    while n > 0:
        ret += 1
        n //= 10
    return ret


while i*i <= n:
    if n % i == 0:
        ans = min(ans, max(dig(i), dig(n//i)))
    i += 1

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

def check(a, b):
    return max(len(str(a)), len(str(b)))

n = int(N ** (1/2))
#arr =[]
res = check(1, N)

i = 1
while i <= n:
  if N % i == 0:
    res = min(res, check(i,int(N / i)))
  i += 1

print(res)

# Optimized solution
N = int(eval(input())) 
n = int(N**.5)
res = len(str(N))
for i in range(2,n+1):
    if N % i == 0:
        #print(len(str(i)),len(str(N/i)))
        f = max(len(str(i)),len(str(N//i)))
        res = min(res, f)
#        print(i, len(str(i)),len(str(N/i)),res, f)
print(res)
# Original solution
n = int(eval(input()))

def myfunc(a, b):
    if len(str(a)) > len(str(b)):
        return len(str(a))
    return len(str(b))

ans = len(str(n))
i = 1
sqrt_n = n ** 0.5
while i <= sqrt_n:
    if n % i == 0:
        ans = min(ans, myfunc(i, n // i))
    i += 1

print(ans)

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

def myfunc(a, b):
    len_a = len(str(a))
    len_b = len(str(b))
    return max(len_a, len_b)

n_sqrt = n ** 0.5
i = 1
MIN = n
while i <= n_sqrt:
    if n % i == 0:
        MIN = min(MIN, myfunc(i, n // i))
    i += 1
print(MIN)
# Original solution
def main():
    def f(a, b):
        return max(len(str(a)), len(str(b)))
    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)
        return divisors
    n = int(eval(input()))
    divisors = make_divisors(n)
    ans = float('inf')
    for a in divisors:
        b = n // a
        ans = min(ans, f(a, b))
    print(ans)


if __name__ == '__main__':
    main()


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

if __name__ == '__main__':
    main()
# Original solution
N=int(eval(input()))

L=int(N**0.5)

for a in range(L+1,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(str(N//a)))
        print((max(ans1,ans2)))
        exit()



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

L=int(N**0.5)

for a in range(L,0,-1):
    if N%a==0:
        ans1=len(str(a))
        ans2=len(str(str(N//a)))
        print((max(ans1,ans2)))
        exit()
# Original solution
import math
n = int(eval(input()))
rootn = int(math.sqrt(n))
ct = 0
for i in range(rootn,n+1):
  if n%i == 0:
    tmp = i
    while tmp//10 != 0:
     ct += 1  
     tmp = tmp//10   
    break
print((ct+1))

# Optimized solution
import math
n = int(eval(input()))
rootn = int(math.sqrt(n))
ct = 0
for i in reversed(list(range(1,rootn+1))):
  if n%i == 0:
    tmp = n//i
    while tmp//10 != 0:
     ct += 1  
     tmp = tmp//10   
    break
print((ct+1))
# Original solution
N = int(eval(input()))
A = 1
ans = len(str(N))
while A**2 <= N:
    if N % A != 0:
        # Bが整数にならない
        A += 1
        continue
    B = N // A
    cur = max(len(str(A)), len(str(B)))
    ans = min(ans, cur)
    A += 1
print(ans)

# Optimized solution
N = int(eval(input()))
ans = len(str(N)) # Fの値は高々この値
for A in range(1, int(N**0.5) + 1):
  if N % A != 0: # AはNの約数でない
    continue
  B = N // A
  f = len(str(max(A,B)))
  ans = min(ans, f)
print(ans)
# Original solution
n = int(eval(input()))
a = 1
b = 1
mx = 10 ** 10
while (a <= b and a <= n):
    if n % a == 0:
        b = int(n / a)
        mx = min(mx, max(a, b))
    a += 1
print((len(str(mx))))


# Optimized solution
n = int(eval(input()))
a = 1
b = 1
mx = 10 ** 10
while (a <= b and a <= 10**5):
    if n % a == 0:
        b = int(n / a)
        mx = min(mx, max(a, b))
    a += 1
print((len(str(mx))))
# Original solution
n = int(eval(input()))
a = 1
b = 1
mx = 10 ** 10
while (a <= b and a <= 10**5):
    if n % a == 0:
        b = int(n / a)
        mx = min(mx, max(a, b))
    a += 1
print((len(str(mx))))

# Optimized solution
n = int(eval(input()))
a = 1
b = 1
mx = 10 ** 10
while (a <= b and a * a <= n):
    if n % a == 0:
        b = int(n / a)
        mx = min(mx, max(a, b))
    a += 1
print((len(str(mx))))