

iN = int(eval(input()))

iLim = int(iN**0.5) + 1



iMinMax = len(str(iN))

for i in range(iLim+1,0,-1):

    if iN % i == 0:

        iMax = len(str(max(i,iN//i)))

        if iMinMax < iMax :

            print(iMinMax)

            exit()

        else:

            iMinMax = iMax

print(iMinMax)

def 解():

    iN = int(eval(input()))

    iLim = int(iN**0.5) + 1



    iMinMax = len(str(iN))

    for i in range(iLim+1,0,-1):

        if iN % i == 0:

            iMax = len(str(max(i,iN//i)))

            if iMinMax < iMax :

                print(iMinMax)

                exit()

            else:

                iMinMax = iMax

    print(iMinMax)

解()

iN = int(eval(input()))
iLim = int(iN**0.5) + 1
iMinMax = len(str(iN))
for i in range(iLim + 1, 0, -1):
    if iN % i == 0:
        iMax = len(str(max(i, iN // i)))
        if iMinMax < iMax:
            print(iMinMax)
            exit()
        else:
            iMinMax = iMax
print(iMinMax)

def 解():
    iN = int(eval(input()))
    iLim = int(iN**0.5) + 1
    iMinMax = len(str(iN))
    for i in range(iLim + 1, 0, -1):
        if iN % i == 0:
            iMax = len(str(max(i, iN // i)))
            if iMinMax < iMax:
                print(iMinMax)
                exit()
            else:
                iMinMax = iMax
    print(iMinMax)


解()

-iN = int(eval(input())) -iLim = int(iN**0.5) + 1 -iMinMax = len(str(iN)) -for i in range(iLim + 1, 0, -1): -    if iN % i == 0: -        iMax = len(str(max(i, iN // i))) -        if iMinMax < iMax: -            print(iMinMax) -            exit() -        else: -            iMinMax = iMax -print(iMinMax) +def 解(): +    iN = int(eval(input())) +    iLim = int(iN**0.5) + 1 +    iMinMax = len(str(iN)) +    for i in range(iLim + 1, 0, -1): +        if iN % i == 0: +            iMax = len(str(max(i, iN // i))) +            if iMinMax < iMax: +                print(iMinMax) +                exit() +            else: +                iMinMax = iMax +    print(iMinMax) + + +解()