n=int(eval(input()))

a,b=0,0

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

    if n%i==0:

        a=i

        b=n//i

    if i>n//i:

        break



alog,blog=1,1

i=0

while 1:

    a=a//10

    if a==0:

        break

    alog+=1



while 1:

    b=b//10

    if b==0:

        break

    blog+=1



print((max(alog,blog)))
import bisect, copy, heapq, math, sys

from collections import *

from functools import lru_cache

from itertools import accumulate, combinations, permutations, product

def input():

    return sys.stdin.readline()[:-1]

def ruiseki(lst):

    return [0]+list(accumulate(lst))

def celi(a,b):

    return -(-a//b)

sys.setrecursionlimit(5000000)

mod=pow(10,9)+7

al=[chr(ord('a') + i) for i in range(26)]

direction=[[1,0],[0,1],[-1,0],[0,-1]]



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()

    return divisors

lst=make_divisors(n)



ans=float('inf')

for i in lst:

    # print(i)

    ans=min(ans,max(len(str(i)),len(str(n//i))))

print(ans)
n = int(eval(input()))
a, b = 0, 0
for i in range(1, n + 1):
    if n % i == 0:
        a = i
        b = n // i
    if i > n // i:
        break
alog, blog = 1, 1
i = 0
while 1:
    a = a // 10
    if a == 0:
        break
    alog += 1
while 1:
    b = b // 10
    if b == 0:
        break
    blog += 1
print((max(alog, blog)))

import bisect, copy, heapq, math, sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product


def input():
    return sys.stdin.readline()[:-1]


def ruiseki(lst):
    return [0] + list(accumulate(lst))


def celi(a, b):
    return -(-a // b)


sys.setrecursionlimit(5000000)
mod = pow(10, 9) + 7
al = [chr(ord("a") + i) for i in range(26)]
direction = [[1, 0], [0, 1], [-1, 0], [0, -1]]
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()
    return divisors


lst = make_divisors(n)
ans = float("inf")
for i in lst:
    # print(i)
    ans = min(ans, max(len(str(i)), len(str(n // i))))
print(ans)

+import bisect, copy, heapq, math, sys +from collections import * +from functools import lru_cache +from itertools import accumulate, combinations, permutations, product + + +def input(): +    return sys.stdin.readline()[:-1] + + +def ruiseki(lst): +    return [0] + list(accumulate(lst)) + + +def celi(a, b): +    return -(-a // b) + + +sys.setrecursionlimit(5000000) +mod = pow(10, 9) + 7 +al = [chr(ord("a") + i) for i in range(26)] +direction = [[1, 0], [0, 1], [-1, 0], [0, -1]] -a, b = 0, 0 -for i in range(1, n + 1): -    if n % i == 0: -        a = i -        b = n // i -    if i > n // i: -        break -alog, blog = 1, 1 -i = 0 -while 1: -    a = a // 10 -    if a == 0: -        break -    alog += 1 -while 1: -    b = b // 10 -    if b == 0: -        break -    blog += 1 -print((max(alog, blog))) + + +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 + + +lst = make_divisors(n) +ans = float("inf") +for i in lst: +    # print(i) +    ans = min(ans, max(len(str(i)), len(str(n // i)))) +print(ans)