#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );
 
    int N; cin >> N; stack< int > bits;
 
    for( int k = 0; N != 0; k++ )
    {
        int bit = ( N & 1 ); 
        
        bits.push( bit ), N >>= 1;
 
        if ( ( k & 1 ) and bit )
            N++;
    }
 
    if ( bits.empty() )
        cout << 0;
    else
        while( !bits.empty() )
            cout << bits.top(), bits.pop();
}