#include<iostream>
#include<string>
using namespace std;
int main(){
	int i,n;
	string a;
	cin>>a;
	n=a.size();
	for(i=n-1;i>=0;i--){
		cout<<a[i];
	}
	cout<<endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string ans = "";
  while(n != 0){
    int t = n%(-2);
    if(t == -1) t = 1;
    ans.push_back('0'+t);
    n = (n-t)/(-2);
  }
  if(ans.size() == 0) ans = "0";
  reverse(ans.begin(),ans.end());
  cout << ans << endl;
}