#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1LL << 60;
const long long mod = (int)1e9 + 7;
int main() {
  int N;
  cin >> N;
  vector<int> a;
  while (N != 0) {
    a.push_back(abs(N % 2));
    if (N % 2 != 0 && N < 0) N--;
    N = N / 2;
    N = -N;
    cerr << N;
  }
  reverse((a).begin(), (a).end());
  if (N == 0) cout << 0;
  if (N != 0) {
    for (auto x : a) {
      cout << x;
    }
  }
}
