#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, x[100];
  cin >> N;
  if (N == 0) {
    cout << '0';
    return 0;
  }
  for (int i = 0; i < 100; i++) {
    x[i] = 0;
  }
  for (int i = 0; N != 0; i++, N -= N & 1, N /= -2) {
    x[i] = N & 1;
  }
  int foo = 99;
  for (; x[foo] == 0; foo--);
  for (; foo >= 0; foo--) {
    cout << x[foo];
  }
  return 0;
}
#include <iostream>
#include <map>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <sstream>
#include <cmath>
#include <math.h>
#include <string>
using namespace std;
typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    string a = "";
    while( n != 0 ) {
        int r = n % 2;
        if( r == -1 ) r = 1;
        a += r + '0';
        n = ( n - r ) / ( -2 );
    }
    reverse( a.begin() , a.end() );
    if( a == "" ) cout << '0';
    else cout << a;
}