#include <cstdio>
#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <cmath>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#define rep(i,n) for (int i=0;i<n;i++)
using ll = long long;
using namespace std;

void solve(){

}
int main (){
    ios::sync_with_stdio(0);
    cin.tie(0);

    ll n;
    cin >> n;

    if(n==0) {
        cout << 0;
        return 0;
    }

    vector<vector<ll>> a(33,vector<ll> (2));
    a[0][0] = 1;
    a[0][1] = 0;

    ll m = 1;

    for(int i=1;i<33;i++){
        m*=-2;
        if(m>0){
            a[i][0] = a[i-1][0] + m;
            a[i][1] = a[i-1][1];
        }else{
            a[i][1] = a[i-1][1] + m;
            a[i][0] = a[i-1][0];
        }
    }
    ll tmp = n;
    vector<int> ans(33,0);
    for(int i=32;i>0;i--){
        if(tmp>0){
            if(a[i][0]>=tmp&&tmp>a[i-1][0]){
                ans[i] = 1;
                tmp = tmp - m;
            }else{
                ans[i] = 0;
            }
        }else{
            if(a[i][1]<=tmp&&tmp<a[i-1][1]){
                ans[i] = 1;
                tmp = tmp - m;
            }else{
                ans[i] = 0;
            }
        }
        m /= (-2);
    }
    if(tmp == 1){
        ans[0] = 1; 
    }else{
        ans[0] = 0;
    }

    bool flag = false;

    for(int i=32; i >= 0; i--){
        if(!flag){
            if(ans[i]==1){
                cout << ans[i];
                flag = true;
            }
        }else{
            cout << ans[i];
        }
    }


    return 0;
}
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define fori(a) for(auto i : a )
#define all(a) begin(a), end(a)
#define set(a,b) memset(a,b,sizeof(a))
#define sz(a) a.size()
#define pi 3.14159
#define ll long long
#define ull unsigned long long
#define pb push_back
#define PF push_front //deque
#define mp make_pair
#define pq priority_queue
#define mod 1000000007
#define f first
#define s second
#define pii pair< int, int >
#define vi vector<int>
#define vpii vector<pii>
#define debug(v) for(auto i:v) cout<<i<<" ";
#define tc int t; cin >> t; while(t--)

using namespace std;
string repeat(string s, int n) {
    string s1 = "";
    for (int i=0; i<n;i++)
        s1+=s;
    return s1;
}
string getString(char x) {
    string s(1, x);
    return s;
}

void optimizeIO(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int gcd(int a, int b){
    if (a == 0)  return b;
    return gcd(b % a, a);
}
void  solve(){
  ll n;
  cin>>n;
  if(n==0){
    cout<<0<<endl;
    return;
  }
  string ans="";
  ll x=0;
  ll num=2;
  while(n!=0){
    // cout<<n<<endl;
    if(abs(n)%num!=0){
      if(x%2==0) n-= num/2;
      else n+= num/2;
      ans+="1";
    }
    else ans+="0";
    num*=2;
    x++;
  }
  reverse(all(ans));
  cout<<ans<<endl;
}
int main(){
    optimizeIO();
    // tc
    { solve();
    }
}
