fun main(args : Array<String>) {
    var (a, b, c) = readLine()!!.split(" ").map { it.toInt() }

    if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) {
        println(0)
        return
    }

    if (a == b && b == c) {
        println(-1)
        return
    }

    var cnt = 0
    while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
        val ta = a
        val tb = b
        a = (b + c) / 2
        b = (ta + c) / 2
        c = (ta + tb) / 2
        cnt++
    }

    println(cnt)
}