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

    if (N == 0L) {
        println(0)
        return
    }

    val sb = StringBuilder()
    var r = N
    var k = 0
    if (N > 0) {
    } else {
        r = -N
        k = 1
    }

    while (r > 0) {
        if (r and 1L == 1L) {
            sb.append(1)
            if (k % 2 == 0) {
                r--
            } else {
                r++
            }
        } else {
            sb.append(0)
        }
        k++
        r /= 2
    }

    println(sb.reverse().toString())
}
