fun main(arr:Array<String>) {
    val num = readLine()!!.toLong()
    var cur = num
    var div = 1L
    val flags = mutableListOf<Boolean>()
    while (cur != 0L) {
        if(cur % (div*2) != 0L) {
            flags.add(true)
            cur -= div
        } else {
            flags.add(false)
        }
        div *= -2
    }
    if(flags.size == 0) {
        println(0)
    } else {
        println(flags.map { if(it) "1" else "0" }.reversed().joinToString(""))
    }
}