unittest
{
	assert( [ "-9" ].solve == "1011" );
	assert( [ "123456789" ].solve == "11000101011001101110100010101" );
	assert( [ "0" ].solve == "0" );
}



import std.conv;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	
	if( n == 0 ) return "0";
	
	// -2進数表記での桁数を計算
	auto i = 0L;
	auto ms = [ 0L ];
	auto ps = [ 0L ];
	for( auto d = 1L; n < ms.back || ps.back < n; i++, d *= -2 )
	{
		ms ~= ms.back;
		ps ~= ps.back;
		if( d < 0 ) ms.back += d;
		else        ps.back += d;
	}
	
	// 上から順に桁を計算
	auto anss = new char[ i ];
	for( auto j = i - 1, d = ( -2L ) ^^ j; 0 <= j; j--, d /= -2 )
	{
		auto x = n - d;
		if( ms[ j ] <= x && x <= ps[ j ] )
		{
			n = x;
			anss[ $ - 1 - j ] = '1';
		}
		else
		{
			anss[ $ - 1 - j ] = '0';
		}
	}
	return anss.idup;
}
