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";
	
	// 桁ごとに表現できる範囲を計算
	auto ms = [ 0L ];
	auto ps = [ 0L ];
	for( auto i = 0L; n < ms.back || ps.back < n; i++ )
	{
		ms ~= ms.back;
		ps ~= ps.back;
		if( i % 2 ) ms.back += ( -2L ) ^^ i;
		else        ps.back += ( -2L ) ^^ i;
	}
	
	// 上の桁から判定
	auto anss = new long[ ms.length - 1 ];
	for( auto i = 0L, j = anss.length.signed - 1; i < anss.length; i++, j-- )
	{
		auto d = ( -2L ) ^^ j.signed;
		auto x = n - d;
		if( ms[ j ] <= x && x <= ps[ j ] )
		{
			n -= d;
			anss[ i ] = 1;
		}
	}
	return anss.to!( string[] ).join;
}
