local x=io.read("*n")

local function lastjump(x)
    local n=0
    local jump=1
    local last=0
    while n<x do
        n=n+jump
        jump=jump+1
        last=last+1
    end
    return last
end

print(lastjump(x))