import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    auto N = lread();
    // writeln(N);
    // auto a = new long[](N);
    // writeln(a);
    // foreach (i; 0 .. N)
    // {
    //     // writeln(i);
    //     a[i] = i + 1;
    // }
    // writeln(a);
    long ok = (N + 1);
    long ng = -1;
    while (abs(ok - ng) > 1)
    {
        long mid = (ok + ng) / 2;
        if (((mid + 1) * ((mid + 1) + 1)) / 2 >= N)
        {
            ok = mid;
        }
        else
        {
            ng = mid;
        }
    }
    // writeln(ok + 1);
    foreach (i; 1 .. (ok + 1) + 1)
    {
        if (((i + 1) * ((i + 1) + 1)) / 2 - i == N)
        {
            continue;
        }
        else
        {
            writeln(i);

        }

    }
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
