console.log((args=>{
  let N = args.trim()|0;
  if ( !N ) return '0';
  let s = [];
  while ( N ) {
    s.push(N&1);
    N = (N&~1) / -2;
  }
  return s.reverse().join``;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));