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

# F(A, B)を定義する
def F(A, B):
    A = str(A)
    B = str(B)
    if len(A) >= len(B):
        return len(A)
    else:
        return len(B)

minimumList = []
for a in range(1, int(N**0.5) + 1):
    if N % a == 0:
        b = N // a
        minimumList.append(F(a, b))
print((min(minimumList)))

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

# F(A, B)を定義する
def F(A, B):
    A = str(A)
    B = str(B)
    if len(A) >= len(B):
        return len(A)
    else:
        return len(B)

minimumList = []
for a in range(1, int(N**0.5) + 1):
    if N % a == 0:
        b = N // a  # 商
        minimumList.append(F(a, b))
print((min(minimumList)))
# Original solution
N = int(eval(input()))
for i in range(0,int(N**0.5)):
    if N % (int(N**0.5) - i) == 0:
        A = (int(N**0.5) - i)
        B = N//(int(N**0.5) - i)
        break
print((len(str(B))))

# Optimized solution
n = int(eval(input()))
ans = 10**100
for a in range(1,int(n**(0.5))+2):
    if n%a == 0:
        b = n//a
        f = len(str(b))
        ans = min(ans,f)
print(ans)
# Original solution
def m_c_d(x, y):
    if x == 0:
        return y
    elif y == 0:
        return x
    else:
        return m_c_d(y, x % y)


a = int(eval(input()))
b = 0
for i in range(int(a ** 0.5 + 1), 1, -1):
    b = max(m_c_d(a, i), b)
print((max(len(str(b)), len(str(a // b)))))



# Optimized solution
a = int(eval(input()))
b = 10 ** 10
for i in range(1, int(a ** 0.5) + 1):
    if a % i == 0:
        b = min(b, max(len(str(i)), len(str(a // i))))
print(b)
# Original solution
num = int(eval(input()))

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

d = len(str(num))

for i in range(1,num+1):
    if num % i == 0:
        b = int(num // i)
        c = function(i,b)
        if d >= c:
            d = c
        else:
            print(d)
            exit()
print(d)

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

digits = len(str(num))

ans = digits

for i in range(1,10 ** (digits // 2 + 1)):
    if num % i == 0:
        target = max(len(str(i)), len(str(num//i)))
        if ans >= target:
            ans = target
        else:
            print(ans)
            exit()
print(ans)
# Original solution
num = int(eval(input()))

digits = len(str(num))

ans = digits

for i in range(1,10 ** (digits // 2 + 1)):
    if num % i == 0:
        target = max(len(str(i)), len(str(num//i)))
        if ans >= target:
            ans = target
        else:
            print(ans)
            exit()
print(ans)

# Optimized solution
n=int(eval(input()))
x=int(n**0.5)
for i in range(x):
    if n%(x-i)==0:
        print((len(str(n//(x-i)))))
        break
# Original solution
n = int(eval(input()))
dv = []
dved = []
for i in range(1,n//2):
    if n%i==0 and not(i in dved):
        dv.append(i)
        dved.append(n//i) 
    if i in dved:
        break
print((len(str(dved[-1]))if len(dv)>0 else 1))


# Optimized solution
import math
n = int(eval(input()))
dv = []
dved = []
for i in range(1,int(math.sqrt(n)+1)):
    if n%i==0 and not(i in dved):
        dv.append(i)
        dved.append(n//i) 
    if i in dved:
        break
print((len(str(dved[-1]))if len(dv)>0 else 1))
# Original solution
# 入力 : 自然数     ex) 12
# 出力 : 約数リスト ex) [2, 2, 3]
def factorization(n):
    R = int(n)
    s = 0
    L = []
    div = 2
    while s == 0:
        for i in range(div, R + 1):
            if n % i == 0:
                n = n / i
                div = i
                if n == 1:
                    s = 1
                L.append(i)
                break
    return L


n = int(eval(input()))
if n == 1:
    print((1))
    exit()
divs = factorization(n)
N = [i for i in divs]  # N = bit探索する桁数
maxDigit = n
# Nの要素の全組み合わせが出力
for i in range(1, 1 << len(N)):
    output = []
    nonout = []
    outNum = 1
    nonOutNum = 1
    for j in range(len(N)):
        if ((i >> j) & 1) == 1:
            output.append(N[j])  # このjが今回探索するindexの1つ
            outNum *= N[j]
        else:
            nonout.append(N[j])
            nonOutNum *= N[j]
    # print("{} vs {}".format(outNum, nonOutNum))
    digitOut = 0
    digitNonOut = 0
    while outNum > 0:
        digitOut += 1
        outNum = int(outNum / 10)
    while nonOutNum > 0:
        digitNonOut += 1
        nonOutNum = int(nonOutNum / 10)
    if max(digitOut, digitNonOut) < maxDigit:
        maxDigit = max(digitOut, digitNonOut)
print(maxDigit)


# Optimized solution
# 入力 : 自然数     ex) 12
# 出力 : 約数リスト ex) [(2,2),(3,1)]
def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base ** exponent
    return a

n = int(eval(input()))
if n == 1:
    print((1))
    exit()
fct = factorize(n)
maxDigit = n
for div in divisorize(fct):
    outNum = num(div)
    nonOutNum = int(n/outNum)
    digitOut = 0
    digitNonOut = 0
    while outNum > 0:
        digitOut += 1
        outNum = int(outNum / 10)
    while nonOutNum > 0:
        digitNonOut += 1
        nonOutNum = int(nonOutNum / 10)
    if max(digitOut, digitNonOut) < maxDigit:
        maxDigit = max(digitOut, digitNonOut)
print(maxDigit)
# Original solution
import math

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


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

def gk(n):
    ans = 0
    while n:
        ans += 1
        n//=10
    return ans

if int(N**(1/2)) ** 2 == N:
    print(( gk( int(N**(1/2)) )))
else:
    for i in range( int(N**(1/2)), N+1):
        if N % i == 0:
            print(( gk(i) ))
            exit(0)



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

def gk(n):
    ans = 0
    while n:
        ans += 1
        n //= 10
    return ans


ans = float("inf")
for i in range(1, int(N**(1/2))+1):
    if N % i == 0:
        ans = min(ans,gk( N//i)) 
print(ans)
exit(0)


lst = []
for i in range(2,int(N**(1/2))+1):
    if N % i == 0:
        ans = 0
        while N % i == 0:
            ans += 1
            N //= i
        lst.append( (i,ans) )

cand = [1]
while lst:
    p,cnt = lst.pop()
    nl = []
    # for p ==
# Original solution
def f(a, b):
    str_a = str(a)
    len_a = len(str_a)
    str_b = str(b)
    len_b = len(str_b)

    return len_a if len_a > len_b else len_b

N = int(eval(input()))

min = 10**10
for i in range(1, 10 ** len(str(N))//2):
    a = i
    if N % a == 0:
        b = int(N / a)
    else:
        continue

    if len(str(a)) > len(str(N)) // 2 + 1:
        break

    ret = f(a, b)
    if min > ret:
        min = ret

print(min)


# Optimized solution
def f(a, b):
    str_a = str(a)
    len_a = len(str_a)
    str_b = str(b)
    len_b = len(str_b)

    return len_a if len_a > len_b else len_b

N = int(eval(input()))

min = 10**10
max_iter = 10 ** (len(str(N))//2 + 1)

for i in range(1, max_iter):
    a = i
    if N % a == 0:
        b = int(N / a)
    else:
        continue

    ret = f(a, b)
    if min > ret:
        min = ret
        if min <= len(str(N))//2:
            break

print(min)
# Original solution
def I(): return int(eval(input()))
N = I()
ans = float('INF')
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        temp = max(len(str(i)),len(str(N//i)))
        ans = min(temp,ans)
print(ans)


# Optimized solution
def I(): return int(eval(input()))
N = I()
ans = float('INF')
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        ans = min(len(str(N//i)),ans)
print(ans)
# Original solution
N = int(eval(input()))

ans = 1<<60
for a in range(1, int(N**0.5)+1):
  if N%a==0:
    b = N//a
    max_len = max(len(str(a)), len(str(b)))
    ans = min(ans, max_len)
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)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N = int(eval(input()))
print((len(str(make_divisors(N)[-1]))))
# Original solution
# -*- coding: utf-8 -*-

N = int(eval(input()))

aN = []
i = 1
# かけ合わせる数の左右逆はやる意味ない
while i <= N//i:
    if N % i == 0:
        aN.append([i, N//i])
    i += 1

# 末尾に格納されたペアの右側の数値
print((len(str(aN[-1][1]))))

# Optimized solution
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def divisors(N: int) -> set:
    """ 約数の列挙・個数 """
    from math import sqrt

    # 1とその数はデフォで入れとく
    s = {1, N}
    # 終点はルート切り捨て
    for i in range(2, int(sqrt(N))+1):
        # 割り切れるなら、iとN/iを追加
        if N % i == 0:
            s.add(i)
            s.add(N // i)
    return s

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

N = INT()

ans = INF
for div1 in divisors(N):
    div2 = N // div1
    ans = min(ans, compare(div1, div2))
print(ans)
# Original solution
import math
n = int(eval(input()))
nn = int(math.sqrt(n))
for i in range(nn,n+1):
    if n%i==0:
        print((len(str(i))))
        break


# Optimized solution
import math
n = int(eval(input()))
nn = int(math.sqrt(n))
for i in range(nn,0,-1):
    if n%i==0:
        print((len(str(n//i))))
        break
# Original solution
from collections import Counter
from itertools import product

n = int(eval(input()))

def prime_factrize(a):
    ret = []
    while a%2 == 0:
        ret.append(2)
        a//=2
    f = 3
    while f * f <= a:
        if a % f == 0:
            ret.append(f)
            a//=f
        else:
            f+=2
    if a != 1:
        ret.append(a)
    return ret

f = prime_factrize(n)

def func(a, b):
    a = len(str(a))
    b = len(str(b))
    return max(a, b)

ans = float('inf')
for bit in product([0, 1], repeat=(len(f))):
    a = 1
    b = 1
    for i, v in enumerate(bit):
        if v == 0: a*=f[i]
        else: b*=f[i]
    ans = min(ans, func(a, b))
print(ans)
            




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

def func(a, b):
    a = len(str(a))
    b = len(str(b))
    return max(a, b)

ans = float('inf')
for i in range(1, int(n**0.5)+1):
    if n%i==0: ans = min(ans, func(i, n//i))

print(ans)
# Original solution
import math
n = int(eval(input()))
ans = 10
a = int(math.sqrt(n))
for i in range(a, n+1):
    q, mod = divmod(n, i)
    if mod == 0:
        print((max(list(map(len, list(map(str, [i, q])))))))
        exit()

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

while n%m:
    m -= 1

print((len(str(n//m))))
# Original solution
def func(a, b):
	return max(list(map(len, list(map(str, [a, b])))))

N = int(eval(input()))

min_dig = 10 ** 18
for i in range(1, N + 1):
	if not N % i:
		j = N // i
		if j < i:
			break
		min_dig = min(min_dig, func(i, j))

print(min_dig)


# Optimized solution
def func(a, b):
	return max(list(map(len, list(map(str, [a, b])))))

N = int(eval(input()))

min_dig = 10 ** 18
for i in range(1, int(N ** 0.5) + 1):
	if not N % i:
		j = N // i
		min_dig = min(min_dig, func(i, j))

print(min_dig)
# Original solution
import math
N = int(eval(input()))
ans = 1000
for k in range(1,math.floor(math.sqrt(N))+1):
    if N % k == 0:
        ans = min(ans,max(len(str(k)),len(str(N//k))))
print(ans)


# Optimized solution
import math
N = int(eval(input()))
ans = len(str(N))
for k in range(2,math.floor(math.sqrt(N))+1):
    if N % k == 0:
        ans = min(ans,max(len(str(k)),len(str(N//k))))
print(ans)
# Original solution
# -*- coding: utf-8 -*-
from math import sqrt,ceil,log10

n = int(eval(input()))

nsr = sqrt(n)

for i in range(ceil(nsr),n+1):
    if n%i==0:
        ret = ceil(log10(i))
        if 10**ret==int(i):
            print((ret+1))
        else:
            print(ret)
        exit()


# Optimized solution
# -*- coding: utf-8 -*-

n = int(eval(input()))

def cntd(x):
    digits = 0

    while x/10>0:
        x = x//10
        digits += 1
    return digits

ans = cntd(n)

a = 1
while a*a<=n:
    if n%a!=0:
        a += 1
        continue

    b = n//a
    cur = max(cntd(a), cntd(b))
    if ans>cur:
        ans = cur
    a += 1

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

ans=len(str(n))
for i in range(1,n+1):
  if n%i==0:
    if n//i<i:
      break
    else:
      ans=min(ans,max(len(str(i)),len(str(n//i))))
print(ans)

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

ans=len(str(n))
for i in range(1,int(n**(1/2))+1):
  if n%i==0:
    ans=min(ans,max(len(str(i)),len(str(n//i))))
print(ans)
# Original solution
N = int(eval(input()))
mn=100
for A in range(1,int(N**(0.5))+1):
    cnta=0
    cntb=0
    if N%A==0:
        B=N/A
        while A>0:
            A//=10
            cnta+=1
        while B>0:
            B//=10
            cntb+=1
        cnt=max(cnta,cntb)
        mn=min(mn,cnt)
print(mn)

# Optimized solution
n=int(eval(input()))
for i in range(int(n**(0.5)),0,-1):
  if n%i==0:
    print((len(str(n//i))))
    exit()
# Original solution
def F(x,y):
    return max(len(str(x)),len(str(y)))
N = int(eval(input()))
dmin = 100
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        n = N//i
        dmin = min(dmin,F(i,n))
print(dmin)

# Optimized solution
N = int(eval(input()))
cmin = 1000
for i in range(1,int(N**0.5)+1):
    if N%i==0:
        a = str(i)
        b = str(N//i)
        cmin = min(cmin,max(len(a),len(b)))
print(cmin)
# Original solution
from math import sqrt
def solve():
    N = int(eval(input()))

    mn = float('inf')
    for A in range(int(sqrt(N))+1,0,-1):
        if N % A == 0:
            B = N // A
            mn = min(f(A,B), mn)

    print(mn)

def f(A,B):
    return max(len(str(A)), len(str(B)))
    
if __name__ == '__main__':
    solve()

# Optimized solution
from math import sqrt
def solve():
    N = int(eval(input()))
    ans = float('inf')
    for A in range(1,int(sqrt(N))+1):
        if N % A == 0:
            ans = min(ans, len(str(N//A)))
    
    print(ans)

if __name__ == '__main__':
    solve()
# Original solution

import math

def read_input():
    n = int(eval(input()))
    return n


def submit():
    n = read_input()

    factor_cand = int(math.ceil(math.sqrt(n)))

    while n % factor_cand:
        factor_cand += 1

    a = int(n / factor_cand)
    b = int(factor_cand)

    al = len([c for c in str(a)])
    bl = len([c for c in str(b)])

    print((max(al, bl)))



if __name__ == '__main__':
    submit()


# Optimized solution

import math

def read_input():
    n = int(eval(input()))
    return n


def submit():
    n = read_input()

    factor_cand = int(math.ceil(math.sqrt(n)))

    while n % factor_cand:
        factor_cand -= 1

        if factor_cand == 1:
            nl = len([c for c in str(n)])
            print(nl)
            return

    a = int(n / factor_cand)
    b = int(factor_cand)

    al = len([c for c in str(a)])
    bl = len([c for c in str(b)])

    print((max(al, bl)))



if __name__ == '__main__':
    submit()
# Original solution
import math
 
N=int(eval(input()))
 
a=math.ceil(math.sqrt(N))
 
for i in range(a,((N+1)//10+1)):
  if N%i==0:
    r=N//i
    print((max(len(str(i)),len(str(r)))))
    exit()

print((len(str(N))))

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

print((len(str(N))))
# Original solution
N = int(eval(input()))
A = 2
for i in range(int(N**(1/2)), 0, -1):
    if N % i == 0:
        print((len(str(N//i))))
        exit()

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


# Optimized solution
import math

N = int(eval(input()))
n = int(math.sqrt(N)) + 1
if N / n == n:
    print((int(math.log10(n) + 1)))
else:
    while N % n != 0:
        n -= 1
    print((int(math.log10(N/n) + 1)))
# Original solution
import math
N=int( eval(input()))
for r in range (int(math.sqrt(N)),N+1):
  if N%r==0:
    count=1
    for i in range (0,9):
      r=r/10
      if r<1:
        print(count)
        break
      count+=1
    break

# Optimized solution
import math
N=int( eval(input()))
for r in range (int(math.sqrt(N)),0,-1):
  if N%r==0:
    count=1
    l=N/r
    for i in range (0,10):
      l=l/10
      if l<1:
        print(count)
        break
      count+=1
    break
# Original solution
n=int(eval(input()))
if all(n%i for i in range(2,int(n**.5)+1)):
	print((len(str(n))))
	exit()
for i in range(int(0-n**.5//-1),n+1):
	if n%i==0:
		print((len(str(i))))
		exit()

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

# import collections

n = int(eval(input()))


# n, k = map(int, input().split(' '))
# a = list(map(int, input().split(' ')))


def f(a, b):
    return max(math.floor(math.log10(a)) + 1, math.floor(math.log10(b)) + 1)


a = 1
ans = 11
while a <= math.sqrt(n):
    if n % a == 0 and f(a, n // a) <= ans:
        # print('test', a, n // a, f(a, n // a))
        ans = f(a, n // a)
    a += 1

print(ans)


# Optimized solution
# from pprint import pprint
import math

# import collections

n = int(eval(input()))


# n, k = map(int, input().split(' '))
# a = list(map(int, input().split(' ')))


def f(a, b):
    return max(math.floor(math.log10(a)+1), math.floor(math.log10(b))+1)


a = 1
ans = 11
while a <= math.sqrt(n):
    if n % a == 0 and f(a, n // a) <= ans:
        ans = f(a, n // a)
    a += 1

print(ans)
# Original solution
N = int(eval(input()))
ans = float("inf")
c = 1
while c <= int(N**(1/2)//1):
  if N%c == 0:
    ans = min(ans,max(len(str(c)),len(str(N//c))))
  c += 1  
print(ans)

# Optimized solution
N = int(eval(input()))
ans = float("inf")
for i in range(1,int(N**(1/2)//1)+1):
  if N%i == 0:
    ans = min(ans,len(str(N//i)))
print(ans)
# Original solution
N = int(eval(input()))

def divisor(n):
    cd = []
    i = 1
    while i*i <= n:
        if n%i==0:
            cd.append(i)
            if i != n//i:
                cd.append(n//i)
        i+=1
    return cd

cd = divisor(N)
ans = len(str(cd[-1]))
print(ans)




# Optimized solution
def solve():
    N = int(eval(input()))
    n = int(N**0.5)+1
    for i in range(n,0,-1):
        if N%i==0:
            ans = len(str(N//i))
            break
    return ans
print((solve()))
# Original solution
# 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)))))

# Optimized solution
#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)
# Original solution
n = int(eval(input()))
jud = []
for i in range(1, int(n**0.5) + 1):
    x = n // i
    if x * i == n:
        jud.append(len(str(x)))
print((min(jud)))

# Optimized solution
def yaku(n):
    yalu_l = []
    for j in range(1, int(n ** 0.5) + 1):
        if n % j == 0:
            yalu_l.append([n // j, j])
        else:
            continue
    return yalu_l


ans = 10 ** 9

n = int(eval(input()))

for i in yaku(n):
    p = len(str(i[0]))
    q = len(str(i[1]))
    ans = min(max(p, q), ans)

print(ans)
# Original solution
n=int(eval(input()))
for i in range(int((n**0.5+1)//1),0,-1):
  if n/i%1==0:
    f=max(len(str(i)),len(str(n//i)))
    break
print(f)
      

# Optimized solution
n=int(eval(input()))
s=10**11
for i in range(1,int(n**0.5)+1):
  if n%i==0:
    s=min(s,max(i,n//i))
print((len(str(s))))
# Original solution
n = int(eval(input()))

min_digits = 100
for i in range(int(n ** 0.5) + 1):
    a = i + 1
    if n % a != 0:
        continue
    b = n // a
    x = max([a, b])
    digits = len(str(x))
    if digits < min_digits:
        min_digits = digits

print(min_digits)


# Optimized solution
def main():
    n = int(eval(input()))

    m = int(n ** 0.5)
    if n < 4:
        m += 1

    min_f = len(str(n))

    for i in reversed(list(range(1, m + 1))):
        if n % i == 0:
            b = n // i
            db = len(str(b))
            di = len(str(i))
            f = max(db, di)
            if f < min_f:
                min_f = f

    print(min_f)


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

for n in range(1,1+10**5):
  if N%n==0:
    a = min(a,max(len(str(n)),len(str(N//n))))

print(a)

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

while N%n:
  n-=1

print((len(str(N//n))))
# Original solution
import math
N = int(eval(input()))

sqrt_N = int(math.sqrt(N))
min_F = float('inf')

for i in range(1,sqrt_N + 1):
    if N % i == 0:
        A = i
        B = N // i
        if min_F > max(len(str(A)),len(str(B))):
            min_F = max(len(str(A)),len(str(B)))

print(min_F)

# Optimized solution
import math
N = int(eval(input()))
N_sqrt = math.floor(math.sqrt(N))

ans = float('inf')
for i in range(1, N_sqrt + 1):
    if N % i == 0:
        if ans > max(len(str(i)), len(str(N // i))):
            ans = max(len(str(i)), len(str(N // i)))

print(ans)
# Original solution
from math import sqrt
N = int(eval(input()))
root_N = int(sqrt(N)) + 1


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


min_F = 10**6
for a in range(1, root_N + 1):
    if N % a == 0:
        b = N // a
        min_F = min(min_F, F(a, b))
print(min_F)


# 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


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


N = int(eval(input()))
min_num = 10**9
for divisor in make_divisors(N):
    min_num = min(min_num, F(divisor, N // divisor))
print(min_num)
# Original solution
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append((i, n//i))

    divisors.sort()
    return divisors

from math import log10
N = int(eval(input()))
div = make_divisors(N)

def F(A, B):
    return max(log10(A)+1, log10(B)+1)
ans = 10**9
for a, b in div:
    ans = min(ans, F(a, b))
print((int(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, n//i))

    divisors.sort()
    return divisors

from math import log10
N = int(eval(input()))
div = make_divisors(N)

def F(A, B):
    return max(int(log10(A))+1, int(log10(B))+1)
ans = 10**9
for a, b in div:
    ans = min(ans, F(a, b))
print(ans)