#define _USE_MATH_DEFINES
#define forn(i, n) for(lli i=0; i<n; i++)
#define forn1(i, n) for(lli i=1; i<n; i++)
#define debug(x) cerr << "------" << x << endl;
#define All(x) x.begin(), x.end()
#define elif else if
#define lli long long int
#define _USE_MATH_DEFINES
#define _x first
#define _y second

#define _CRT_SECURE_NO_WARNINGS



//#include <bits/stdc++.h>

#include <stdlib.h>
#include <limits.h>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <cmath>
#include <numeric>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <bitset>
#include <stack>
#include <list>
#include <sstream>

#include <random>
#include <typeinfo>

using namespace std;

//Constant vars

const lli MOD = 1000000007, LIM = 4294967295;

//Vars

lli n, m, a, b, c, d, q, k, tr, summ, ans, minx, maxx, l, r, mid, res, mass1[10000][10000], mass2[100001], mass[100000], from[1000][1000];

string s, trs, str, ss;

//Structures

set<lli> g, bb, all;
set<lli> myset;
vector<lli> myvec, toWrite, myvec2;
vector<string> myvecs;
vector<pair<lli, lli>> mm, mm1;
vector<vector<lli>> mvv;
queue<lli> myq;
map<lli, lli> mymap, mymap1, mymap2;
map<lli, vector<lli>> mymapvec;
multiset<lli> mmset;
unordered_map<string, lli> smap;





int compare(const void * a, const void * b) {

	return ((*(lli*)a) - (*(lli*)b));

};

bool compare1(const string & a, const string & b) {

	if (a.substr(15, 4) > b.substr(15, 4)) {

		return 1;

	} elif(a.substr(15, 4) < b.substr(15, 4)) {

		return 0;

	}

	if (a.substr(12, 2) > b.substr(12, 2)) {

		return 1;

	} elif(a.substr(12, 2) < b.substr(12, 2)) {

		return 0;

	}

	if (a.substr(9, 2) > b.substr(9, 2)) {

		return 1;

	} elif(a.substr(9, 2) < b.substr(9, 2)) {

		return 0;

	}

	if (a.substr(0, 2) > b.substr(0, 2)) {

		return 1;

	} elif(a.substr(0, 2) < b.substr(0, 2)) {

		return 0;

	}

	if (a.substr(3, 2) > b.substr(3, 2)) {

		return 1;

	} elif(a.substr(3, 2) < b.substr(3, 2)) {

		return 0;

	}

	if (a.substr(6, 2) > b.substr(6, 2)) {

		return 1;

	} elif(a.substr(6, 2) < b.substr(6, 2)) {

		return 0;

	}

	return 0;

};

lli gcd(lli a, lli b) {

	while (b != 0) {

		lli t = b;
		b = a % b;
		a = t;

	}

	return a;

}

lli gcdex(lli a, lli b, lli & x, lli & y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	lli x1, y1;
	lli d = gcdex(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}

lli NOK(lli n1, lli n2) {

	return n1 * n2 / gcd(n1, n2);

}

lli bin_pow(lli base, lli p) {
	if (p == 1) {
		return base % MOD;
	}
	if (p == 0) {
		return 1;
	}

	if (p % 2 == 0) {
		lli t = bin_pow(base, p / 2) % MOD;
		return t * t % MOD;
	}
	else {
		return bin_pow(base, p - 1) * base % MOD;
	}
}

lli inverse_element(lli x) {
	return bin_pow(x, MOD - 2);
}


lli divide(lli a, lli b) {
	return a * inverse_element(b) % MOD;
}

int main() {

	//freopen("input.txt", "r", stdin);
	//freopen("testlist.txt", "w", stdout);

	ios::sync_with_stdio(0);
	cin.tie();

	cin >> n;

	a = 0;
	b = 1;

	while (n != 0) {

		toWrite.push_back(n % abs(b * 2) != 0);
		n -= b * ((n % abs(b * 2)) != 0);
		b *= -2;

	}

	if (toWrite.size() == 0) {
	
		toWrite.push_back(0);

	}

	for (auto i = toWrite.rbegin(); i != toWrite.rend(); i++) {

		cout << *i;

	}

	return 0;
}
//

Measured memory_bytes: 3600