import scala.io.StdIn._
object Main extends App {

  def solve(n: Int, res: List[String]): List[String] = {
    if (n == 0) res
    else {
      n % 2 match {
        case 0 => solve(n / -2, "0" :: res)
        case _ => solve((n - 1) / -2, "1" :: res)
      }
    }
  }
  val ans = solve(readInt, Nil)

  println(if (ans.isEmpty) "0" else ans.mkString)
}
