import java.lang.Math.pow

fun main(args: Array<String>) {
    abc105c()
}

/*
    2^n   0  1 2  3  4   5  6
    val 0 1 -2 4 -8 16 -32 64
    sum 0 1 -1 3 -5 11 -21 43
 */
fun abc105c() {
    val n = readLine()!!.toInt()

    if (n == 0) return println("0")

    var value = 0L
    val answer = StringBuilder()
    var i = 0
    while (value != n.toLong()) {
        val pow = pow((-2).toDouble(), (i + 1).toDouble()).toLong()
        if ((n - value) % pow != 0L) {
            answer.append("1")
            value += pow((-2).toDouble(), i.toDouble()).toLong()
        } else {
            answer.append("0")
        }
        i++
    }

    println(answer.reverse().toString())
}
