#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();
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAppbnQgbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oIGZhbHNlICksIGNpbi50aWUoIG51bGxwdHIgKSwgY291dC50aWUoIG51bGxwdHIgKTsKIAogICAgaW50IE47IGNpbiA+PiBOOyBzdGFjazwgaW50ID4gYml0czsKIAogICAgZm9yKCBpbnQgayA9IDA7IE4gIT0gMDsgaysrICkKICAgIHsKICAgICAgICBpbnQgYml0ID0gKCBOICYgMSApOyAKICAgICAgICAKICAgICAgICBiaXRzLnB1c2goIGJpdCApLCBOID4+PSAxOwogCiAgICAgICAgaWYgKCAoIGsgJiAxICkgYW5kIGJpdCApCiAgICAgICAgICAgIE4rKzsKICAgIH0KIAogICAgaWYgKCBiaXRzLmVtcHR5KCkgKQogICAgICAgIGNvdXQgPDwgMDsKICAgIGVsc2UKICAgICAgICB3aGlsZSggIWJpdHMuZW1wdHkoKSApCiAgICAgICAgICAgIGNvdXQgPDwgYml0cy50b3AoKSwgYml0cy5wb3AoKTsKfQ==