
fun main(args : Array<String>) {
    var N = readLine()!!.toInt()

    val BASE = -2

    if (N == 0) {
        println('0')
    }

    var S = ""
    while (N != 0) {
        var rest = N % BASE
        S = Math.abs(rest).toString() + S
        N = N / BASE
        if (rest < 0) {
            N++
        }
    }

    println(S)
}
