#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  int s[11];
  cin >> n;
  if (n == 0) {
    cout << 0 << endl;
    return 0;
  }
  int i = 0;
  while (n != 0) {
    temp = n % -2;
    if (n < 0) temp = abs(temp);
    s[i] = temp;
    i++;
    n /= 2;
  }
  for (int j = i - 1; j >= 0; j--) {
    cout << s[j];
  }
  return 0;
}
