"use strict";

function main(input) {
  var lines = input.split('\n');
  var N = parseInt(lines[0]);
  var result = [];

  while (N !== 0) {
    if (N % 2 !== 0) {
      N--;
      result.push(1);
    } else {
      result.push(0);
    }

    N /= -2;
  }

  result.reverse();
  console.log(result.join("") || "0");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

function splitNum(line) {
  return line.split(/\s+/).map(function (n) {
    return parseInt(n);
  });
}
