import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    auto N = readln.chomp.to!int;
    int[] po;
    while (N != 0) {
        const c = abs(N % 2);
        po ~= c;
        N = (N - c)  / (-2);
    }
    po.retro.each!write;
    writeln;
}

