#include <iostream>
#include <string>

using namespace std;
 
int main() {
	int n; cin >> n;
	string ans;
	if (n == 0) ans = '0';
	while (n) {
		int t = n % -2;
		if (t < 0) t += 2;
		n = (n - t) / -2;
		if (t) ans = '1' + ans;
		else ans = '0' + ans;
	}
	cout << ans << endl;

	return 0;
}