#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
    ll n;
    cin >> n;
    if (n == 0){
        cout << 0 << "\n";
        return 0;
    }
    vector<int>ans;
    while (n != 0){
        if (n % 2 == 0){
            ans.push_back(0);
            n /= -2;
        }
        else if (n < 0){
            ans.push_back(1);
            n /= -2;
            n++;
        }
        else {
            ans.push_back(1);
            n /= -2;
        }
    }
    reverse(ans.begin(), ans.end());
    for (int v : ans){
        cout << v;
    }
    cout << "\n";
    return 0;
}
