function Main(s){
  var n = +s;
  if(n === 0){console.log(0);return;}
  var ans = [], i = 1, j = 1;
  while(n && Math.abs(n) < 9e9){
    if(Math.abs(n) & i){
      ans.push(1);
      n -= j;
    }
    else ans.push(0);
    i *= 2;
    j *= -2;
  }
  console.log(ans.reverse().join(""));
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));