function main(input) {
  var N = input[0]-0;
  var x = N;
  var a = "";
  while(x!=0){
    if(x%2==1 || x%2==-1){
      if(a.length%2==1) x++; else x--;
      a = "1"+a;
    }else{
      a = "0"+a;
    }
    x = x/2;
  }
  console.log(a||"0");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
