#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	cin>>n;
	if(n==0){
		cout<<0<<endl;
		return 0;
	}
	string s="";
	for(int i=0;n!=0;i++){
		if(n%2!=0){
			s='1'+s;
			if(i%2==0){
				n--;
			}
			else{
				n++;
			}
		}
		else if(n%2==0){
			s='0'+s;
		}
		n=n/2;
	}
	cout<<s<<endl;
	return 0;
}