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

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void calc(int n) {
    if (n == 0) {
        writeln(0);
        return;
    }

    int[] ans;
    while (n != 0) {
        if (n > 0) {
            ans ~= n % 2;
            n = -n / 2;
        }
        else {
            ans ~= -n % 2;
            n = (1 - n) / 2;
        }
    }

    ans.reverse();
    writeln(ans.map!(to!string).join());
}

void main() {
    int n = readint;
    calc(n);
}
