fun main(args: Array<String>) {
    var N = nextInt()
    var buf = StringBuilder()
    while (N != 0) {
        if (N % 2 != 0) {
            N -= 1
            buf.append("1")
        }
        else buf.append("0")
        N /= -2
    }
    val ans = if (buf.toString().length == 0) "0" else buf.toString().reversed()
    println(ans)
}

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }
