#include <bitset>
#include <cmath>
#include <iostream>

using namespace std;

int a(int i) {
  int ret{};
  for (int j = 0; j != i; ++j) {
    ret += lround(pow(2, 2 * j + 1));
  }
  return ret;
}

int main() {
  long long N;
  cin >> N;
  bitset<64> ans;

  for (int i = 0; i != 16; ++i) {
    auto x = ((N + a(i)) >> 2*i) % 4;
    ans.set(2 * i + 1, x & 0x2);
    ans.set(2 * i, x & 0x1);
  }
  
  bool flag{false};
  for (int i = 31; i >= 0; --i) {
    if (flag |= ans.test(i), !flag) continue;
    cout << ans.test(i);
  }
  if (!flag) cout << 0;
  cout << endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
  ll N;
  cin >> N;
  if (N == 0){
    cout << '0' << endl;
    exit(0);
  }
  
  vector<ll> bin(0);
  while (N != 1){
    ll amari = N % -2;
    if (amari >= 0){
      bin.push_back(amari);
      N /= -2;
    }
    else{
      bin.push_back(1);
      N /= -2;
      N += 1;
    }
  }
  bin.push_back(1);
  
  for (ll i = bin.size() - 1; i >= 0; i--){
    ll a = bin.at(i);
    cout << a;
  }
  cout << endl;
  
  /*ll a = N % -2;
  ll b = N / -2;
  cout << a << ' ' << b << endl;*/
}