import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

import scala.annotation.tailrec

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val n = in.readLine().toInt

    def negbin(n: Int): List[Int] = {
      @tailrec
      def inner(n: Int, acc: List[Int]): List[Int] = {
        if (n == 0) {
          acc match {
            case Nil => 0 :: Nil
            case acc => acc
          }
        } else if (n % 2 == 0) {
          inner(n / -2, 0 :: acc)
        } else {
          inner((n - 1) / -2, 1 :: acc)
        }
      }

      inner(n, Nil)
    }

    out.println(
      negbin(n).mkString("")
    )

    out.flush()
  }
}