object Main extends App{
    val Array(a,b,c) = scala.io.StdIn.readLine.split(" ").map(_.toInt)
    
    var array = Array(a,b,c)
    var count = 0
    var infinite = false
    
    while(array.forall(_ % 2 == 0) && !infinite){
        count += 1
        array = Array((array(1)/2 + array(2)/2), (array(0)/2 + array(2)/2), (array(0)/2 + array(1)/2))
        if (array sameElements Array(a,b,c)) infinite = true
    }
    
    if (infinite) println(-1) else println(count)
}