import std.stdio;
import std.ascii;
import std.conv;
import std.string;
import std.algorithm;
import std.range;
import std.functional;
import std.math;
import core.bitop;

void main()
{
    auto n = readln.chomp.to!long;
    string result;
    while (n != 0)
    {
        long m = n % -2;
        // writeln([n,m]);
        n /= -2;
        result ~= (m == 0) ? '0' : '1';
        if (m == -1)
        {
            n++;
        }
    }
    if (result.length == 0)
    {
        writeln("0");
    }
    else
    {
        writeln(result.dup.reverse);
    }
}
