function getKeta(x)
    local keta = 1
    while(10 <= x) do
        keta, x = keta + 1, math.floor(x / 10)
    end
    return keta
end
local n = io.read("*n")
local sqn = math.ceil(math.sqrt(n))
local k = 100
min = math.min
for i = 1, sqn do
    if(n % i == 0) then
    k = min(k, getKeta(n / i))
    end
end
print(k)