#include <bits/stdc++.h>
using namespace std;
std::vector<int> fn, fna, fnb;
int solve(int a) {
  if (a < 0) {
    auto it = lower_bound(fna.begin(), fna.end(), abs(a));
    int rt = *it;
    for (int j = it - fna.begin(); j >= 0; j--)
      if (rt - abs(a) >= 2 * fn[j]) rt -= 2 * fn[j];
    return -rt;
  } else {
    for (int i = 0; i < fn.size(); i++) {
      if ((fn[i] - 1) / 3 >= abs(a)) {
        int rt = (fn[i] - 1) / 3;
        for (int j = i; j >= 0; j--)
          if (rt - abs(a) >= fn[j]) rt -= fn[j];
        return rt;
      }
    }
  }
  return 0;
}
int main(int argc, char const *argv[]) {
  long long int N, reg, ans = 0;
  std::cin >> N;
  std::vector<int> data;
  for (reg = 1; reg < 1e10; reg *= 4) {
    fn.push_back(reg);
    fna.push_back(2 * (reg - 1) / 3);
    fnb.push_back((reg - 1) / 3);
  }
  while (N != 0) {
    reg = solve(N);
    N = N - reg;
    ans += abs(reg);
  }
  while (ans > 0) data.push_back(ans % 2 == 1 ? 1 : 0), ans /= 2;
  if (data.size() != 0)
    for (int i = data.size() - 1; i >= 0; i--) std::cout << data[i];
  else
    std::cout << 0;
  std::cout << '\n';
  return 0;
}
