fun main(args: Array<String>) {

    var (a, b, c) = readLine()!!.split(" ").map(String::toInt)

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

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

    var count = 0

    while (true) {

        if (a and 1 == 1 || b and 1 == 1 || c and 1 == 1) {
            println(count)
            return
        }

        val at = a / 2
        val bt = b / 2
        val ct = c / 2

        a = bt + ct
        b = at + ct
        c = at + bt

        count++
    }
}



