def PrimeDecomp(N,ConcFlag):

    if ConcFlag:

        if N<=1:

            return [1],1

        else:

            I = 2

            PrimeDec = []

            DivCount = 1

            while I*I<=N:

                Cnt = 0

                while N%I==0:

                    N //= I

                    PrimeDec.append(I)

                if Cnt>=1:

                    DivCount *= (Cnt+1)

                I += 1

            if N>=2:

                PrimeDec.append(N)

                DivCount *= 2

            return PrimeDec,DivCount        

    else:

        if N<=1:

            return [1],[1],1

        else:

            I = 2

            PrimeDec = []

            PrimeCnt = []

            DivCount = 1

            while I*I<=N:

                Cnt = 0

                while N%I==0:

                    N //= I

                    Cnt += 1

                if Cnt>=1:

                    PrimeDec.append(I)

                    PrimeCnt.append(Cnt)

                    DivCount *= (Cnt+1)

                I += 1

            if N>=2:

                PrimeDec.append(N)

                PrimeCnt.append(1)

                DivCount *= 2

            return PrimeDec,PrimeCnt,DivCount

          

from itertools import combinations

from operator import mul

from functools import reduce

N = int(eval(input()))

PrimeDec,_ = PrimeDecomp(N,True)

FABMax = len(str(N))

for TR in range(1,len(PrimeDec)+1):

    for A in set(reduce(mul,T) for T in combinations(PrimeDec,TR)):

        B = N//A

        FABMax = min(FABMax,max(len(str(A)),len(str(B))))

print(FABMax)
def Divisor(N):

    Left,RightRev = [],[]

    I = 1

    while I*I<=N:

        if N%I==0:

            Left.append(I)

            if I!=N//I:

                RightRev.append(N//I)

        I += 1

    Div = Left+RightRev[::-1]

    DivCount = len(Div)

    return Div,DivCount

  

N = int(eval(input()))

Div,_ = Divisor(N)

FABMax = len(str(N))

for A in Div:

    B = N//A

    if A>B:

        break

    FABMax = min(FABMax,max(len(str(A)),len(str(B))))

print(FABMax)
def PrimeDecomp(N, ConcFlag):
    if ConcFlag:
        if N <= 1:
            return [1], 1
        else:
            I = 2
            PrimeDec = []
            DivCount = 1
            while I * I <= N:
                Cnt = 0
                while N % I == 0:
                    N //= I
                    PrimeDec.append(I)
                if Cnt >= 1:
                    DivCount *= Cnt + 1
                I += 1
            if N >= 2:
                PrimeDec.append(N)
                DivCount *= 2
            return PrimeDec, DivCount
    else:
        if N <= 1:
            return [1], [1], 1
        else:
            I = 2
            PrimeDec = []
            PrimeCnt = []
            DivCount = 1
            while I * I <= N:
                Cnt = 0
                while N % I == 0:
                    N //= I
                    Cnt += 1
                if Cnt >= 1:
                    PrimeDec.append(I)
                    PrimeCnt.append(Cnt)
                    DivCount *= Cnt + 1
                I += 1
            if N >= 2:
                PrimeDec.append(N)
                PrimeCnt.append(1)
                DivCount *= 2
            return PrimeDec, PrimeCnt, DivCount


from itertools import combinations
from operator import mul
from functools import reduce

N = int(eval(input()))
PrimeDec, _ = PrimeDecomp(N, True)
FABMax = len(str(N))
for TR in range(1, len(PrimeDec) + 1):
    for A in set(reduce(mul, T) for T in combinations(PrimeDec, TR)):
        B = N // A
        FABMax = min(FABMax, max(len(str(A)), len(str(B))))
print(FABMax)

def Divisor(N):
    Left, RightRev = [], []
    I = 1
    while I * I <= N:
        if N % I == 0:
            Left.append(I)
            if I != N // I:
                RightRev.append(N // I)
        I += 1
    Div = Left + RightRev[::-1]
    DivCount = len(Div)
    return Div, DivCount


N = int(eval(input()))
Div, _ = Divisor(N)
FABMax = len(str(N))
for A in Div:
    B = N // A
    if A > B:
        break
    FABMax = min(FABMax, max(len(str(A)), len(str(B))))
print(FABMax)

-def PrimeDecomp(N, ConcFlag): -    if ConcFlag: -        if N <= 1: -            return [1], 1 -        else: -            I = 2 -            PrimeDec = [] -            DivCount = 1 -            while I * I <= N: -                Cnt = 0 -                while N % I == 0: -                    N //= I -                    PrimeDec.append(I) -                if Cnt >= 1: -                    DivCount *= Cnt + 1 -                I += 1 -            if N >= 2: -                PrimeDec.append(N) -                DivCount *= 2 -            return PrimeDec, DivCount -    else: -        if N <= 1: -            return [1], [1], 1 -        else: -            I = 2 -            PrimeDec = [] -            PrimeCnt = [] -            DivCount = 1 -            while I * I <= N: -                Cnt = 0 -                while N % I == 0: -                    N //= I -                    Cnt += 1 -                if Cnt >= 1: -                    PrimeDec.append(I) -                    PrimeCnt.append(Cnt) -                    DivCount *= Cnt + 1 -                I += 1 -            if N >= 2: -                PrimeDec.append(N) -                PrimeCnt.append(1) -                DivCount *= 2 -            return PrimeDec, PrimeCnt, DivCount +def Divisor(N): +    Left, RightRev = [], [] +    I = 1 +    while I * I <= N: +        if N % I == 0: +            Left.append(I) +            if I != N // I: +                RightRev.append(N // I) +        I += 1 +    Div = Left + RightRev[::-1] +    DivCount = len(Div) +    return Div, DivCount -from itertools import combinations -from operator import mul -from functools import reduce - -PrimeDec, _ = PrimeDecomp(N, True) +Div, _ = Divisor(N) -for TR in range(1, len(PrimeDec) + 1): -    for A in set(reduce(mul, T) for T in combinations(PrimeDec, TR)): -        B = N // A -        FABMax = min(FABMax, max(len(str(A)), len(str(B)))) +for A in Div: +    B = N // A +    if A > B: +        break +    FABMax = min(FABMax, max(len(str(A)), len(str(B))))