#include<bits/stdc++.h>
using namespace std;
string S;
void dfs(int x)
{
	if(x==0)
		return ;
	if(x%2==0)
	{
		S+="0";
		dfs(x/(-2));
		return ;
	}
	S+="1";
	dfs((x-1)/(-2));
	return ;
}
int main()
{
	int N;
	cin>>N;
	if(!N)
	{
		cout<<N;
		return 0;
	}
	dfs(N);
	reverse(S.begin(),S.end());
	cout<<S;
	return 0;
}