fun main(array: Array<String>) {
    var (a, b, c) = readLine()!!.split(" ").map { it.toInt() }
    var cnt = 0
    var tempA = 0
    var tempB = 0
    var tempC = 0

    if(a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
        print(0)
        return
    }
    if(a == b && b == c) {
        print(-1)
        return
    }
    while (true) {
            if(a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
                print(cnt)
                return
            }
        tempA = b/2 + c/2
        tempB = a/2 + c/2
        tempC = a/2 + b/2
        a = tempA
        b = tempB
        c = tempC
            cnt++

    }
    print(cnt)
}