CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
ans = 10
for i in range(1,int(N**(1/2))+1):
  if N%i == 0:
    j = N//i
    k = 0
    while j//(10**k) > 0:
      k += 1
    ans = min(ans,k)
print(ans)

# Optimized solution
N = int(eval(input()))
ans = 11
for A in range(1,int(N**(1/2))+1):
  if N%A == 0:
    B = str(N//A)
    tmp = len(B)
    ans = min(tmp,ans)
print(ans)
# Original solution
N = int(eval(input()))


def digit(N):
    d = 0
    while N >= 1:
        N /= 10
        d += 1
    return d


f = []
i = 1
while i * i <= N:
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        f.append(max(d1, d2))
    i += 1

print((min(f)))


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


def digit(N):
    return len(str(N))


f = []
i = 1
while i * i <= N:
    if N % i == 0:
        d1 = digit(i)
        d2 = digit(int(N/i))
        f.append(max(d1, d2))
    i += 1

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

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


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

while i**2 <= n:
    if n%i == 0:
        num = n//i
        ans = max(len(str(num)), len(str(i)))
    i += 1
print(ans)
# Original solution
from math import ceil, sqrt, floor, log10

N = int(eval(input()))

for i in range(ceil(sqrt(N)), N + 1):
    if N % i == 0:
        print((floor(log10(i)) + 1))
        break


# Optimized solution
from math import floor, sqrt, log10

N = int(eval(input()))

for i in range(floor(sqrt(N)), 0, -1):
    if N % i == 0:
        print((floor(log10(N // i)) + 1))
        break
# Original solution
def F(a, b):
    def _(n):
        c = 0
        while n:
            n //= 10
            c += 1
        return c

    return _(max(a, b))


N = int(eval(input()))
ans = float('inf')
for a in range(1, N + 1):
    b = N // a
    if a > b:
        break
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)


# Optimized solution
def F(a, b):
    # def _(n):
    #     c = 0
    #     while n:
    #         n //= 10
    #         c += 1
    #     return c

    # return _(max(a, b))
    return len(str(max(a, b)))


N = int(eval(input()))
ans = float('inf')
n = int(N**0.5) + 1
for a in range(1, n):
    b = N // a
    if b != N / a:
        continue
    ans = min(ans, F(a, b))
print(ans)
# Original 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()))
answer = float('inf')
max = 0
len_div = len(make_divisors(N))

if len_div % 2 == 0:
    for i in range(len_div // 2):
        A_len = len(str(make_divisors(N)[i]))
        B_len = len(str(make_divisors(N)[len_div - i - 1]))
        if A_len <= B_len:
            max = B_len
        else:
            max = A_len
        # print(A_len, B_len, max)
else:
    for i in range(len_div // 2 + 1):
        A_len = len(str(make_divisors(N)[i]))
        B_len = len(str(make_divisors(N)[len_div - i - 1]))
        # print(A_len, B_len)
        if A_len <= B_len:
            max = B_len
        else:
            max = A_len
        # print(A_len, B_len, max)

print(max)



# 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()))
answer = 0
len_div = len(make_divisors(N))
# print(make_divisors(N))
# print(make_divisors(N))
# print(make_divisors(N))
# print(len(make_divisors(N)))
# print(make_divisors(N)[len_div // 2])

if len_div % 2 == 0:
    A_len = len(str(make_divisors(N)[len_div // 2 - 1]))
    B_len = len(str(make_divisors(N)[len_div // 2]))
    if A_len <= B_len:
        answer = B_len
    else:
        answer = A_len
else:
    answer = len(str(make_divisors(N)[len_div // 2]))
    # print(make_divisors(N)[len_div // 2])
print(answer)
# Original solution
import math
N = int(eval(input()))

div = []
for i in range(1, int(math.sqrt(N))+1):
    if N % i == 0:
        div.append((i, N//i))
ans = 30
for elem in div:
    _, a = elem
    cnt = 0
    while a > 0:
        a //= 10
        cnt += 1
    ans = min(ans, cnt)
print(ans)


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

div = []
for i in range(1, int(math.sqrt(N))+1):
    if N % i == 0:
        div.append((i, N//i))
ans = 30
for elem in div:
    _, a = elem
    res = len(str(a))
    ans = min(ans, res)
print(ans)
# Original solution
import sys
import math
N = int(eval(input()))
for n in range(int(math.sqrt(N)),N+1):
  if N%n==0:
    print((max(int(math.log10(n)), int(math.log10(N//n)))+1))
    sys.exit()
    


# Optimized solution
import sys
import math
N = int(eval(input()))
for n in range(int(math.sqrt(N))+1,0,-1):
  if N%n==0:
    print((max(int(math.log10(n)), int(math.log10(N//n)))+1))
    sys.exit()
# Original solution
def main():
    N = int(eval(input()))

    def trial_division(n):
        divs = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0 and i != n//i:
                divs.append((i, n//i))
            elif n % i == 0 and i == n//i:
                divs.append((i, i))
        return divs
    ans = 10**13
    divs = trial_division(N)
    for a, b in divs:
        ans = min(ans, max(len(str(a)), len(str(b))))
    print(ans)


if __name__ == '__main__':
    main()


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

    def enum_divisors(n):
        ans = 10**12
        for i in range(1, n+1):
            if i*i > n:
                break
            if n % i == 0:
                v1 = str(i)
                v2 = str(n//i)
                ans = min(ans, max(len(v1), len(v2)))
        return ans

    print((enum_divisors(N)))


if __name__ == '__main__':
    main()
# Original solution
def f(a, b):
    tmpA, tmpB = a, b
    countA = 0
    while tmpA:
        tmpA //= 10
        countA += 1
    digitA = countA

    countB = 0
    while tmpB:
        tmpB //= 10
        countB += 1
    digitB = countB

    return max(digitA, digitB)

n = int(eval(input()))

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n / a
    if f(a, b) < ans and n % a == 0:
        ans = f(a, b)

print(ans)


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

n = int(eval(input()))

ans = 11
for a in range(1, int(n ** 0.5) + 1):
    b = n // a 
    if n % a == 0 and f(a, b) < ans:
        ans = f(a, b)

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

for a in range(1,n**2+1):
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        if a<=b:
             ans=len(sb)
        else:
            break

print(ans)

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

for a in range(1,int(n**0.5+1)):
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        if a<=b:
             ans=len(sb)
        else:
            break

print(ans)
# Original solution
def calc_digit(n):
    d = 0
    while n > 0:
        d += 1
        n //= 10
    return d


n = int(eval(input()))
temp = -1
ans = 12
i = 1
while i * i <= n:
    if n % i == 0:
        temp = max(calc_digit(i), calc_digit(n // i))
    ans = min(temp,ans)
    i += 1
print(ans)


# Optimized solution
def count_digit(n):
    d = 0
    while n > 0:
        n //= 10
        d += 1
    return d


n = int(eval(input()))

i = 1
ans = 11
while i * i <= n:
    if n % i == 0:
        temp = max(count_digit(i), count_digit(n // i))
        if ans > temp:
            ans = temp
    i += 1
print(ans)
# Original solution
import math
N=int(eval(input()))
for i in range(math.ceil(N**0.5),N+1):
 if N%i==0:print((len(str(i))));break


# Optimized solution
N=int(eval(input()))
print((min(len(str(N//i))for i in range(1,int(N**.5)+1)if N%i<1)))
# Original solution
N = int(eval(input()))
ans = N
def F(a,b):
    return max([len(str(i))for i in [a,b]])
for i in range(1,N+1):
    if i*i>N:break
    if N%i==0:
        a,b = i,N//i
        ans = min(ans,F(a,b))
print(ans)

# Optimized solution
N = int(eval(input()))
def f(a,b):
    res = 0
    for i in [a,b]:
        res = max(len(str(i)),res)
    return res
ans = float("inf")
for a in range(1,N+1):
    if a*a>N:break
    if N%a==0:
        ans = min(ans, f(a,N//a))
print(ans)
# Original solution
def calc_digits(num):
	ans = 1

	while True:
		if num // 10 == 0:
			break

		num //= 10
		ans += 1

	return ans


def main():
	N = int(eval(input()))

	n = int(N ** 0.5)
	ans = 10 ** 10

	for A in range(1, n + 1):
		if N % A == 0:
			B = int(N / A)
		else:
			continue

		A_digits = calc_digits(A)
		B_digits = calc_digits(B)

		max_digits = max(A_digits, B_digits)

		if max_digits < ans:
			ans = max_digits

	print(ans)



  
if __name__ == "__main__":
  	main()

# Optimized solution
def calc_digits(num):
    ans = 1
    while True:
        if num // 10 == 0:
            break
        num //= 10
        ans += 1

    return ans


def main():
    N = int(eval(input()))
    ans = 10 ** 10

    for A in range(1, int(N ** 0.5) + 1):
        if N % A != 0:
            continue
        B = N // A
        A_digits = calc_digits(A)
        B_digits = calc_digits(B)

        max_digits = max(A_digits, B_digits)
        if max_digits < ans:
            ans = max_digits

    print(ans)


if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))
i = int(N**(1/2))
while N%i != 0:
  i += 1
print((len(str(i))))

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

# Optimized solution
n=int(eval(input()))
l=[]
for i in range(1,int(n**0.5)+3):
    if n%i==0:
        l.append(max(len(str(i)),len(str(n//i))))
print((min(l)))
# Original solution
import math
n=int(eval(input()))
ceil=math.ceil(math.sqrt(n))
def f(a,b):
  return max(len(str(a)),len(str(b)))
tmp=10**9
for a in range(1,ceil+1):
  if n%a==0:
    b=n//a
    tmp=min(tmp,f(a,b))
print(tmp)

# Optimized solution
n=int(eval(input()))
def f(a,b):
  a=len(str(a))
  b=len(str(b))
  return max(a,b)

ans=10**9
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
import math
n = int(eval(input()))


ans = 10**9

for i in range(1,int(math.sqrt(n))+2):
    if n % i == 0:
        ans = max(len(str(i)),len(str(n//i)))

print(ans)

# Optimized solution
import sys
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())

def func(a,b):
    return max(len(str(a)),len(str(b)))
ans = 10**10
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
n=int(eval(input()))
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
for i in range(2,s+1):
    if n%i==0:
        while True:
            f.append(i)
            n//=i
            if n%i!=0:
                break
if n!=1:
    f.append(n)
l=len(f)
iter=2**l-1
for i in range(2**l):
    iter+=1
    liter=str(bin(iter))[3:]
    a,b=1,1
    for j in range(l):
        if liter[j]=="0":
            a*=f[j]
        else:
            b*=f[j]
    t=max(len(str(a)),len(str(b)))
    if t<ans:
        ans=t
print(ans)


# Optimized solution
n=int(eval(input()))
ans=len(str(n))
from math import floor,sqrt
s=floor(sqrt(n))
f=[]
ans=len(str(n))
for i in range(2,s+1):
    if n%i==0:
        t=max(len(str(i)),len(str(n//i)))
        if t<ans:
            ans=t
print(ans)
# Original solution
import math

n = int(eval(input()))
i = int(math.sqrt(n))
while i<=n:
  if n%i==0:
    print((len(str(i))))
    break
  i+=1


# Optimized solution
import math

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


def main():
    #infile = open("compprog.txt", mode="r")
    n = int(eval(input()))
    res = f(1, n)
    i = 2
    while i <= math.sqrt(n):
        if n % i == 0:
            this_f = f(i, n // i)
            res = this_f if this_f < res else res
        i += 1
    print(res)
    #infile.close()


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


if __name__ == "__main__":
    main()


# Optimized solution
import math


def main():
    n = int(eval(input()))
    res = f(1, n)
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            res = min(res, f(i, n // i))
    print(res)


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


if __name__ == "__main__":
    main()
# Original solution
N=int(eval(input()))
import math
sqN=math.sqrt(N)
sqN=math.floor(sqN)
i=sqN

while N%i!=0:
    i-=1
a=math.floor(math.log10(i))+1
b=math.floor(math.log10(N//i))+1
candA=max(a,b)
i=sqN
while N%i!=0:
    i+=1
a=math.floor(math.log10(i))+1
b=math.floor(math.log10(N//i))+1
candB=max(a,b)

print((min(candA,candB)))

# Optimized solution
N=int(eval(input()))
import math
sqN=math.sqrt(N)
sqN=math.ceil(sqN)
i=1
ans=float('inf')
def digits(n):
    return(math.floor(math.log10(n))+1)
while i <= sqN:
    q,r=divmod(N,i)
    if r==0:
        ans=min(ans,max(digits(i),digits(q)))
    i+=1
print(ans)
# Original solution
N = int(eval(input()))

def factor(n):
    factList = []
    i = 1
    while i * i <= n:
        if n % i == 0:
            factList.append(i)
            factList.append(n // i)
        i += 1

    factList.sort()
    return factList

fact = factor(N)

ans = float('inf')
for i in range(len(fact)):
    f = max(len(str(fact[i])), len(str(fact[-1 - i])))
    ans = min(ans, f)

print(ans)

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

# 約数の全列挙
def divisors(n):
    divisors = []
    R = int(n**(0.5)) + 1
    for i in range(1, R):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    # divisors.sort(reverse=True)  # ソート
    return divisors

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

# Optimized solution
N=int(eval(input()))
for i in range(int(N ** 0.5 + 1),-1,-1):
    if N % i == 0:
        print((len(str(N // i))))
        exit(0)
# 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)
        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
import math
N = int(eval(input()))
for n in range(int(math.sqrt(N)), N+1):
    if N % n == 0:
        print((int(math.log10(n)) + 1))
        exit()
print((int(math.log10(N))))

# Optimized solution
import math
N = int(eval(input()))
ans = int(math.log10(N))
for n in range(1, int(math.sqrt(N))+1):
    if N % n == 0:
        ans = int(math.log10(N // n)) + 1
print(ans)
# Original solution
n=int(eval(input()))

halfn=int(2+n**0.5)

for i in range(1,halfn):
    if n%i==0:
        memo = i

ans = max(len(str(n//memo)), len(str(memo)))
print(ans)

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

ans = 0

for i in range(1,int(N**0.5)+1):
    if N%i==0:
        ans = i

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

print(ans_len)
# Original solution
def F(a,b):
    a=len(str(a))
    b=len(str(b))-2#float型のため
    return a if a>b else b
n=int(eval(input()))
o=[]
k=100000000
c=0
m=10000000000
for i in range(1,n):
    if c>0:
        c-=1
        continue
    s=n/i
    if s.is_integer():
        k=F(i,s)
        o.append(k)
        if k>m:
            break
        m=k
        i=int("1"+"0"*len(str(i)))-i#iを次の位にする
try:
    print((min(o)))
except:
    print((1))

# Optimized solution
from math import sqrt
def F(A,B):
    A=len(str(A))
    B=len(str(B))-2
    return A if A>B else B
n=int(eval(input()))
o=[]
for a in range(1,int(sqrt(n))+1):
    b=n/a
    if b.is_integer():
        o.append(F(a,b))
print((o[-1]))
# Original solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力を取得
N = int(eval(input()))

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

# 求解処理
ans = len(str(N))
for a in range(1, int(math.sqrt(N)) + 1):
    if N % a != 0:
        continue
    b = int(N / a)
    ans = min(ans, F(a, b))
    
# 結果出力
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-
# モジュールのインポート
import math


def get_input() -> int:
    """
    標準入力を取得する.

    Returns:\n
        int: 標準入力
    """
    N = int(eval(input()))
    return N


def F(A: int, B: int) -> int:
    """
    10進表記における、Aの桁数とBの桁数のうち大きい方を返す.

    Args:\n
        A (int): 整数
        B (int): 整数

    Returns:\n
        int: 10進表記における、Aの桁数とBの桁数のうち大きい方
    """
    digits_A = len(str(A))
    digits_B = len(str(B))
    return max(digits_A, digits_B)


def main(N: int) -> None:
    """
    メイン処理.

    Args:\n
        N (int): 整数（1 <= N <= 10^10）
    """
    # 求解処理
    # 全探索を行い、F(A, B)の最小値を求める
    # a <= bとして、sqrt(N)まで探索を行うことで、時間を節約する
    ans = len(str(N))  # 初期値として、Nの桁数を入力
    for a in range(1, int(math.sqrt(N)) + 1):
        # bが整数でない場合、何もしない
        if N % a != 0:
            continue

        # bが整数である場合、a, bのうち桁数が大きい方を求める
        b = int(N / a)
        ans = min(ans, F(a, b))

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    N = get_input()

    # メイン処理
    main(N)
# Original solution
import math
n = int(eval(input()))
ans = float('inf')
i = 1
while i <= math.sqrt(n):
    if n % i == 0:
        a = int(len(str(i)))
        b = int(len(str(n // i)))
        ans = min(ans,max(a,b))
    i += 1
print(ans)

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

i = 1
ans = 0
while i * i <= n:
    if n % i == 0:
        ans = max(len(str(i)), len(str(n // i)))
    i += 1
print(ans)
# Original solution
N = int(eval(input()))
ans = 100000
for i in range(1, 2 * 10 ** 7):
    if N % i == 0:
        ans = min(ans, max(len(str(i)), len(str(N // i))))

print(ans)


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

print(ans)
# Original solution
def resolve():
	n = int(eval(input()))
	arr = []
	for i in range(1, int(n**0.5+1)):
		if n % i == 0:
			arr.append(max(i, n/i))
	print((len(str(int(min(arr))))))
resolve()

# Optimized solution
def div(n):
	a = []
	for i in range(1, int(n**0.5+1)):
		if n % i == 0:
			a.append(i)
			a.append(n//i)
	return sorted(a)
def resolve():
	n = int(eval(input()))
	d = div(n)
	v = len(str(max(d[len(d)//2], d[len(d)//2-1])))
	print(v)
resolve()
# Original solution
n = int(eval(input()))
f = float('inf')
for a in range(1, int(n**0.5)+1):
    if n % a == 0:
        b = n // a
        x = max(len(str(a)), len(str(b)))
        if f > x:
            f = x
print(x)

# Optimized solution
n = int(eval(input()))
sqrt = round(n ** 0.5) + 1
f_min = float('inf')
for i in range(1, sqrt + 1):
    if not n % i:
        a = str(i)
        b = str(n // i)
        f = max(len(a), len(b))
        f_min = min(f_min, f)
print(f_min)
# Original solution
import math
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):
    print((len(str(n))))
    exit()

rtn = math.floor(math.sqrt(n))

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

# Optimized solution
import math
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):
#     print(len(str(n)))
#     exit()

# rtn = math.floor(math.sqrt(n))

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

# n = a * b = b * aでなのでa<=bのaの方を求めてその時のbの桁数出力すれば間に合う。
# 上記のようにbの方から求めるとぎり間に合わない。

rtn = math.ceil(math.sqrt(n))
for i in reversed(list(range(1, rtn + 1))):
    if n % i == 0:
        b = n // i #求めるのはa(=i)ではなくbの方
        print((len(str(b))))
        exit()
# Original solution
from math import sqrt

def F(t):
    return max(len(str(t[0])), len(str(t[1])))

N = int(eval(input()))
m = list(map(F,[(r,int(N / r)) for r in range(2, int(sqrt(N)) + 1) if N % r == 0]))
print((min(m) if len(m) != 0 else len(str(N))))

# Optimized solution
N = int(eval(input()))
m = list([max(len(str(t[0])), len(str(t[1]))) for t in [(r,int(N / r)) for r in range(2, int(N ** 0.5) + 2) if N % r == 0]])
print((min(m) if len(m) != 0 else len(str(N))))
# Original 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)
  return divisors

def digit(n):
  for i in range(15):
    if n>=10**i and n<10**(i+1):
      return i+1
      break

list = make_divisors(n)

ans = 2345

for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))

print(ans)

# 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)
  return divisors
 
def digit(n):
  for i in range(11):
    if n>=10**i and n<10**(i+1):
      return i+1
      break
 
list = make_divisors(n)
 
ans = 12
 
for i in list:
  if max(digit(i), digit(n/i)) < ans:
    ans = max(digit(i), digit(n/i))
 
print(ans)
# Original solution
import math

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

while n<= N:
  if(N % n == 0):
    break
  else:
    n += 1
    
print((len(str(n))))

# Optimized solution
import math

N = int(eval(input()))
n = 1
divisor = []

while n*n<= N:
  if(N % n == 0):
    divisor.append(n)
  n+= 1
  
max_divisor = divisor[-1]

print((len(str(N// max_divisor))))
# Original solution
def make_divisors(n):
    ans = float("inf")
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            div1 = i
            div2 = n // i
            res = max(len(str(div1)), len(str(div2)))
        ans = min(ans, res)
    return ans

if __name__ == '__main__':
    n = int(eval(input()))
    print((make_divisors(n)))

# Optimized solution
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(eval(input()))

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

    res = f_inf
    for a in range(1, int(pow(n, 0.5)) + 1):
        if n % a == 0:
            b = n // a
            t = f(a, b)
            res = min(res, t)

    print(res)


if __name__ == '__main__':
    resolve()
# Original solution
n = int(eval(input()))

start = int(n**0.5 + 1)
for a in range(start,0,-1):
    if n%a == 0:
        b = n//a
        print((len(str(b))))
        exit()

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

for i in range(start,0,-1):
    if n%i == 0:
        s = str(n//i)
        keta = len(s)
        print(keta)
        break
# Original solution
N = int(eval(input()))

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

ans = 100
i = 1
while i <= N**0.5:
    if N%i == 0:
        ans = min(ans, F(i, N//i))
    i += 1
    
print(ans)

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

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

ans = N
i = 1
while i <= N**0.5:
    if N%i == 0:
        ans = min(ans, f(i, N//i))
    i += 1

print(ans)