#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin>>n;
  vector<bool> v;
  while(n!=0){
    v.push_back(abs(n%2));
    n=(n-abs(n%2))/2;
    n*=(-1);
  }
  int k=v.size();
  if(k==0)cout<<0;
  for (int i = k-1; i >= 0; i--) {
    cout<<v[i];
  }
}