object Main {
  def main(args: Array[String]): Unit = {
    solve
  }

  def solve(): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextLong

    val limit = 30 //仮に100桁
    for (mask <- 0 until (1 << limit)) {
      var num = 0L
      for (i <- 0 until limit) {
        if (((mask >> i) & 1) == 1) {
          num += math.pow(-2, i).longValue
        }
      }
      if(num == n) {
        println(mask.toBinaryString)
        return
      }
    }
  }
}
