import scala.math._

object Main {
  def main(args: Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt

    val is = helper(n)
    val s = (0 to is.max).reverse.map(i => if (is contains i) '1' else '0').mkString
    println(if (s == "") "0" else s)
  }

  def helper(n: Int): List[Int] =
    if (n == 0) List[Int]()
    else {
      val l = floor(log(abs(n)) / log(2)).toInt
      val i = l + (if((n > 0) == (l % 2 == 1)) 1 else 0)
      List(i) ++ helper(n - pow(-2, i).toInt)
    }
}