fun main(arr:Array<String>) {
    var abc = readLine()!!.split(" ").map { it.toLong() }
    val log = mutableMapOf<Long, MutableMap<Long, MutableMap<Long, Boolean>>>()
    var ans = 0
    while (abc.all { it%2 == 0L }) {
        if(!log.containsKey(abc[0])) {
            log[abc[0]] = mutableMapOf()
        }
        if(!log[abc[0]]!!.containsKey(abc[1])) {
            log[abc[0]]!![abc[1]] = mutableMapOf()
        }
        if(log[abc[0]]!![abc[1]]!!.containsKey(abc[2])) {
            println(-1)
            return
        }
        log[abc[0]]!![abc[1]]!![abc[2]] = true
        val newAbc = (1..3).map { 0L }.toMutableList()
        newAbc[0] = abc[1]/2 + abc[2]/2
        newAbc[1] = abc[0]/2 + abc[2]/2
        newAbc[2] = abc[0]/2 + abc[1]/2
        abc = newAbc
        ans++
    }
    println(ans)
}
