import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
    val a = cin.nextInt()
    val b = cin.nextInt()
    val c = cin.nextInt()

    var ans = 0
    var checker = 2

    var inf_flag = false

    while (a % 2 == 0) {
        if (a % checker != b % checker || b % checker != c % checker) {
            break
        }
        if (checker > a && checker > b && checker > c) {
            inf_flag = true
            break
        }
        ans += 1
        checker *= 2
    }

    if (inf_flag) {
        println(-1)
    } else {
        println(ans)
    }
}