#include<bits/stdc++.h>
using namespace std;
int a;
#define pb push_back
vector<int> V;

int main(){
cin >> a;
while (a){
V.pb(abs(a%2));
if(a%2!=0){
if (V.size()%2)a--;
else a++;
}
a /= 2;
}
reverse(V.begin(),V.end());
if(V.empty())cout << 0;
for (auto i : V){
cout << i;
}
}
