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

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