fun main(args: Array<String>) {
    agc014a()
}

private data class Cookie(var a: Long, var b: Long, var c: Long)

fun agc014a() {
    val cookie = readLine()!!.split(' ').map { it.toLong() }.toLongArray()
        .let { Cookie(it[0], it[1], it[2]) }

    var answer = 0L

    while (cookie.a % 2 == 0L && cookie.b % 2 == 0L && cookie.c % 2 == 0L) {
        val prev = cookie.copy()
        val tempB = (cookie.a / 2) + (cookie.c / 2)
        val tempC = (cookie.a / 2) + (cookie.c / 2)

        cookie.a = (cookie.b / 2) + (cookie.c / 2)
        cookie.c = tempC
        cookie.b = tempB

        if (cookie == prev) return println(-1)

        answer++
    }

    println(answer)
}
