#include <bits/stdc++.h>
using namespace std;
long long n, m;
string ans;
vector<long long> a;
int main() {
  cin >> n;
  if (n == 0) {
    cout << 0 << endl;
  } else if (n == 1) {
    cout << 1 << endl;
  } else if (n > 0) {
    n--;
    while (n > 0) {
      if (n % 4 == 1) {
        ans = "10" + ans;
      } else if (n % 4 == 2) {
        ans = "11" + ans;
      } else if (n % 4 == 3) {
        ans = "00" + ans;
      } else {
        ans = "01" + ans;
      }
      n--;
      n /= 4;
    }
    ans = '1' + ans;
    cout << ans << endl;
  } else {
    n -= 5;
    n *= -1;
    while (n > 0) {
      if (n % 4 == 1) {
        ans = "00" + ans;
      } else if (n % 4 == 2) {
        ans = "11" + ans;
      } else if (n % 4 == 3) {
        ans = "10" + ans;
      } else {
        ans = "01" + ans;
      }
      n /= 4;
    }
    if (ans[0] == '0') {
      ans.erase(ans.begin());
      if (ans[0] == '0') {
        ans.erase(ans.begin());
      }
    }
    cout << ans << endl;
  }
  return 0;
}
