import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;


void main() {
    int n;
    scan(n);

    if (n == 0) {
        writeln(0);
        return;
    }

    long[] ps;
    long[] ng;

    foreach (i ; 0 .. 32) {
        if (i % 2 == 0) {
            ps ~= 2L^^i;
        }
        else {
            ng ~= 2L^^i;
        }
    }

    int[long] ngc;

    void dfs_ng(long val, int mask, long dep) {
        if (dep == ng.length) {
            ngc[val] = mask;
            return;
        }
        dfs_ng(val + ng[dep], mask | (1<<dep), dep + 1);
        dfs_ng(val, mask, dep + 1);
    }

    dfs_ng(0, 0, 0);

    debug {
        //ngc.writeln;
    }

    foreach (s ; 0 .. (1<<16)) {
        long val;

        foreach (i ; 0 .. 16) {
            if (s & (1<<i)) {
                val += ps[i];
            }
        }

        if (val - n in ngc) {
            int t = ngc[val - n];
            string ans;

            foreach (j ; 0 .. 32) {
                int k = j / 2;

                if (j % 2 == 0) {
                    if (s & (1<<k)) {
                        ans ~= "1";
                    }
                    else {
                        ans ~= "0";
                    }
                }
                else {
                    if (t & (1<<k)) {
                        ans ~= "1";
                    }
                    else {
                        ans ~= "0";
                    }
                }
            }

            writeln(ans.retro.to!string.stripLeft('0'));
        }
    }
}

























void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
