#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long LL;
typedef long double ld;
typedef vector<ll>VI;
typedef pair<int,int>P;
#define VV(T) vector<vector<T>>
#define sz(x) int(x.size())
#define PI 3.1415926535897932384626433832795
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define reprev(i,n) for (ll i=(ll)n-1;i>=0;i--)
#define ALL(a)  (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
#define c_max(a, b) (((ll)a)>((ll)b)?(a):(b))
#define c_min(a,b) (((ll)a)<((ll)b)?(a):(b))
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define vmax(v) *max_element(ALL(v))
#define vmin(v) *min_element(ALL(v))
#define $(x) {cout<<#x<<" = " <<(x)<<endl;}
#define fi first
#define se second
#define MAX 100100//5
#define MAX2 200100
#define MAX6 1001001//6
#define MAX7 10010010//7
#define SENTINEL 2000000000//9
#define INF 1<<30
#define INFTY 1LL<<60
#define MAX_INT INT_MAX
#define Endl '\n'
#define CLR(mat) memset(mat, 0, sizeof(mat))
inline ll GCD(ll a,ll b){return b?GCD(b,a%b):a;}//最大公約数
inline ll lcm(ll a,ll b){return a*b/GCD(a,b);}//最小公倍数
template<class T> bool contain(const std::string& s, const T& v) {
   return s.find(v) != std::string::npos;
}
const int MOD = 1000000007;

inline ll mod_add(ll a,ll b){return (a+b)%MOD;}
inline ll mod_sub(ll a,ll b){return (a+MOD-b)%MOD;}
inline ll mod_mul(ll a,ll b){return ((a%MOD)*(b%MOD))%MOD;}
inline ll mod_pow(ll x,ll n,ll mod=(ll)MOD){ll res=1;while(n>0){
if(n&1)res=res*x%mod;
x=x*x%mod;n>>=1;}return res;}
inline ll mod_inv(ll x){return mod_pow(x,MOD-2);}
inline ll mod_div(ll a, ll b){return mod_mul(a,mod_inv(b));}
const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
// vector型から重複を削除 list.erase(unique(ALL(list)),list.end());
// g++ -o a a.cpp -Wall -lm -std=c++17 -I .
//push_back -> emplace_back

string solve(ll n){
   string str="";
   while(n!=0){
      int x=n/(-2);
      int y=n%(-2);
      if(y<0){
         y+=2;
         x++;
      }
      str+=char(y+'0');
      n=x;
   }
   if(str=="")str="0";
   reverse(ALL(str));
   return str;

}
int main(){
   ll n;cin>>n;
   cout<<solve(n)<<endl;
}
#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;
}