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;

// https://en.wikipedia.org/wiki/Negative_base
int[] negativeBase(int n, int base) {
    if (n == 0) return [0];

    int[] ret;
    while (n != 0) {
        int m = n % base;
        n /= base;
        if (m < 0) {
            m += abs(base);
            n++;
        }
        ret ~= m;
    }
    ret.reverse();
    return ret;
}

void main() {
    int n = readint;

    auto bin = negativeBase(n, -2);
    auto ans = bin.map!(to!string).join();
    writeln(ans);
}
