fun main(arr:Array<String>) {
    var abc = readLine()!!.split(" ").map { it.toLong() }.sorted()
    val dic = mutableSetOf(abc.joinToString("#"))
    var ans = 0
    while (abc.all { it % 2 == 0L }) {
        ans++
        abc = listOf(abc[1]/2 + abc[2]/2, abc[0]/2 + abc[2]/2, abc[0]/2 + abc[1]/2)
        val key = abc.joinToString("#")
        if(dic.contains(key)) {
            println(-1)
            return
        }
        dic.add(key)
    }
    println(ans)
}
