import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = println(solve(new Scanner(System.in)))

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    var N = sc.nextInt

    val ans = new StringBuilder()
    while (N != 0) {
      if (N % 2 != 0) {
        N -= 1
        ans.append("1")
      } else {
        ans.append("0")
      }
      N /= -2
    }
    ans.reverse.toString
  }
}
