import kotlin.math.pow

fun main() {
    val n = readLine()?.toLong() ?: return
    if (n == 0L) {
        println("0")
        return
    }

    val h = hashMapOf<Long, Long>()
    h[0] = 1
    h[1] = -2
    var s = 0L
    var b = 0L
    var c = 0
    if (n < 0) {
        s = 0L
        b = -2L
        c = 0
        while (s > n) {
            s += b
            h[c + 2L] = h[c.toLong()]!! - (b * 2)
            b *= 4
            c += 2
            h[c - 1L] = s
        }
        s = -(2.0.pow((c - 1).toDouble()).toLong())

    } else {
        s = 1L
        b = 4L
        c = 1
        h[2] = b
        while (s < n) {
            s += b
            h[c + 2L] = h[c.toLong()]!! - (b * 2)
            b *= 4
            c += 2
            h[c - 1L] = s
        }
        s = 2.0.pow((c - 1).toDouble()).toLong()
    }
    buildString {
        append("1")
        (c - 2).downTo(0).forEach {
            val v = 2.0.pow(it.toDouble()).toLong()
            if (s != n) {
                if (it % 2L == 0L) {
                    if (s + v + h.getOrDefault(it - 1L, 0) <= n) {
                        s += v
                        append("1")
                    } else {
                        append("0")
                    }
                } else {
                    if (s - v + h[it - 1L]!! >= n) {
                        s -= v
                        append("1")
                    } else {
                        append("0")
                    }
                }
            } else {
                append("0")
            }
        }
    }.let {
        println(it)
    }
}