#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations,permutations,accumulate # (string,3) 3回

#from collections import deque

from collections import deque,defaultdict,Counter

import decimal

import re

#import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#

# my_round_int = lambda x:np.round((x*2 + 1)//2)

# 四捨五入

import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7

#mod = 9982443453

def readInts():

  return list(map(int,input().split()))

def I():

  return int(eval(input()))

n = I()

mind = float('inf')

i = 1

while i*i <= n:

    if n%i == 0:

        if i == n//i:

            mind = min(mind, len(str(i)))

        else:

            maxd = max(len(str(i)), len(str(n//i)))

            mind = min(mind, maxd)

    i += 1

print(mind)

#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations,permutations,accumulate, product # (string,3) 3回

#from collections import deque

from collections import deque,defaultdict,Counter

import decimal

import re

import math

#import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#

# my_round_int = lambda x:np.round((x*2 + 1)//2)

# 四捨五入g

import sys

sys.setrecursionlimit(10000000)

#mod = 10**9 + 7

#mod = 9982443453

mod = 998244353

def readInts():

  return list(map(int,input().split()))

def I():

  return int(eval(input()))

#from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations,permutations,accumulate, product # (string,3) 3回

#from collections import deque

from collections import deque,defaultdict,Counter

import decimal

import re

import math

#import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#

# my_round_int = lambda x:np.round((x*2 + 1)//2)

# 四捨五入g

import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7

#mod = 9982443453

#mod = 998244353

def readInts():

  return list(map(int,input().split()))

def I():

  return int(eval(input()))

n = I()

import math

root = int(math.sqrt(n))+1

ans = float('inf')

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

    if n%i == 0:

        left = i

        right = n//i

        ll = len(str(left))

        lr = len(str(right))

        lm = max(ll,lr)

        ans = min(ans,lm)

print(ans)

# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations, permutations, accumulate  # (string,3) 3回

# from collections import deque
from collections import deque, defaultdict, Counter
import decimal
import re

# import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7
# mod = 9982443453
def readInts():
    return list(map(int, input().split()))


def I():
    return int(eval(input()))


n = I()
mind = float("inf")
i = 1
while i * i <= n:
    if n % i == 0:
        if i == n // i:
            mind = min(mind, len(str(i)))
        else:
            maxd = max(len(str(i)), len(str(n // i)))
            mind = min(mind, maxd)
    i += 1
print(mind)

# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations, permutations, accumulate, product  # (string,3) 3回

# from collections import deque
from collections import deque, defaultdict, Counter
import decimal
import re
import math

# import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
import sys

sys.setrecursionlimit(10000000)
# mod = 10**9 + 7
# mod = 9982443453
mod = 998244353


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


def I():
    return int(eval(input()))


# from statistics import median
# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations, permutations, accumulate, product  # (string,3) 3回

# from collections import deque
from collections import deque, defaultdict, Counter
import decimal
import re
import math

# import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7
# mod = 9982443453
# mod = 998244353
def readInts():
    return list(map(int, input().split()))


def I():
    return int(eval(input()))


n = I()
import math

root = int(math.sqrt(n)) + 1
ans = float("inf")
for i in range(1, root + 1):
    if n % i == 0:
        left = i
        right = n // i
        ll = len(str(left))
        lr = len(str(right))
        lm = max(ll, lr)
        ans = min(ans, lm)
print(ans)

-from itertools import combinations, permutations, accumulate  # (string,3) 3回 +from itertools import combinations, permutations, accumulate, product  # (string,3) 3回 +import math -# 四捨五入 +# 四捨五入g +import sys + +sys.setrecursionlimit(10000000) +# mod = 10**9 + 7 +# mod = 9982443453 +mod = 998244353 + + +def readInts(): +    return list(map(int, input().split())) + + +def I(): +    return int(eval(input())) + + +# from statistics import median +# import collections +# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] +from fractions import gcd +from itertools import combinations, permutations, accumulate, product  # (string,3) 3回 + +# from collections import deque +from collections import deque, defaultdict, Counter +import decimal +import re +import math + +# import bisect +# +#    d = m - k[i] - k[j] +#    if kk[bisect.bisect_right(kk,d) - 1] == d: +# +# +# +# pythonで無理なときは、pypyでやると正解するかも！！ +# +# +# my_round_int = lambda x:np.round((x*2 + 1)//2) +# 四捨五入g +# mod = 998244353 -mind = float("inf") -i = 1 -while i * i <= n: +import math + +root = int(math.sqrt(n)) + 1 +ans = float("inf") +for i in range(1, root + 1): -        if i == n // i: -            mind = min(mind, len(str(i))) -        else: -            maxd = max(len(str(i)), len(str(n // i))) -            mind = min(mind, maxd) -    i += 1 -print(mind) +        left = i +        right = n // i +        ll = len(str(left)) +        lr = len(str(right)) +        lm = max(ll, lr) +        ans = min(ans, lm) +print(ans)