#include<bits/stdc++.h>
typedef long long ll;
typedef std::pair<ll,ll> P;

#define rep(i,n) for(int i = 0; i < int(n); i++)
using namespace std;

template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

constexpr ll mod = 1e9 + 7;

struct UnionFind {
public:
	vector <ll> par; // 
	vector <ll> siz; // 

	UnionFind() {}

	UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
		for (ll i = 0; i < sz_; ++i) par[i] = i;
	}
	void init(ll sz_) {
		par.resize(sz_);
		siz.assign(sz_, 1LL);
		for (ll i = 0; i < sz_; ++i) par[i] = i;
	}

	ll root(ll x) {
		while (par[x] != x) {
			x = par[x] = par[par[x]];
		}
		return x;
	}

	bool merge(ll x, ll y) {
		x = root(x);
		y = root(y);
		if (x == y) return false;
		if (siz[x] < siz[y]) swap(x, y);
		siz[x] += siz[y];
		par[y] = x;
		return true;
	}

	bool issame(ll x, ll y) {
		return root(x) == root(y);
	}

	ll size(ll x) {
		return siz[root(x)];
	}
};

int main() {
	ll n;
	cin >> n;
	vector<int> ans;
	for (int i = 0; i < 60; i++) {
		ll m = n % (1LL << (i+1));
		if (m) {
			ans.push_back(1);
			ll sub = 1LL << i;
			if (i % 2 == 1) {
				sub *= -1;
			}
			n -= sub;
		}
		else ans.push_back(0);
		if (n == 0) break;
	}
	reverse(ans.begin(), ans.end());
	for (auto a : ans) {
		cout << a;
	}
	cout << endl;
	return 0;
}

#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <functional>
#include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for( int i = n; i >= 0; i-- )
#define REP(i,s,t) for( int i = s; i <= t; i++ )
#define RREP(i,s,t) for( int i = s; i >= t; i-- )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000


int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin >> N;
    if(N == 0) {cout << 0 << endl; return 0;}
    int cnt = 0;
    string A;
    while(N != 0) {
        if(cnt % 2 == 0) {
            if(abs(N) % 2 == 1) {
                N -= 1;
                A = "1" + A;
            } else {
                A = "0" + A;
            }
        } else {
            if(abs(N) % 2 == 1) {
                N += 1;
                A = "1" + A;
            } else {
                A = "0" + A;
            }
        }
        N /= 2;
        //N *= -1;
        cnt++;
    }
    cout << A << endl;

    return 0;
}

