import java.util.BitSet

fun main(args: Array<String>) {
    var N = readInputLine().toLong()
    
    if (N == 0L) {
        println(0)
        return
    }
    
    val ans = BitSet()
    
    var base = -2L
    
    for (i in 0..60) {
        if (N % base != 0L) {
            ans.set(i)
            N -= base / -2L
        }
        base *= -2L
    }
    
    val ansStr = CharArray(ans.size(), {'0'})
    
    for (i in 0 until ans.size()) {
        if (ans.get(i)) {
            ansStr[ans.size() - i - 1] = '1'
        }
    } 
    
    println(ansStr.joinToString("").trimStart{it == '0'})
}

fun readInputLine(): String {
    return readLine()!!
}
