# include "iostream"
# include "cstdio"
# include "cmath" 

using namespace std;

int n; 

void Dfs(int n){
	if(n==0) return;
	int now=n%2;
	if(now) n--; 
	Dfs(n/(-2)); 
	printf("%d",abs(now)); 
	return; 
}

int main(){
	scanf("%d",&n); 
	if(n==0){
		printf("0"); 
	}else{
		Dfs(n); 
	}
	return 0; 
}