local n=io.read("n")

local function lower_bound()
    local max=n+1
    local min=0
    while 1<max-min do
        mid=(max+min)//2
        if mid*(mid+1)//2>=n then
            max=mid
        else
            min=mid
        end
    end
    return max
end

local x=lower_bound()
for i=1,x do
    if i~=x*(x+1)//2-n then
        print(i)
    end
end