import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    var a = sc.nextInt()
    var b = sc.nextInt()
    var c = sc.nextInt()
    var ans = 0
    val dic = arrayListOf<List<Int>>()
    var flg = false

    while (true) {
        val abc = listOf(a, b, c).sorted()
        if (abc in dic) {
            ans = -1
        }
        for (v in abc) {
            if (v % 2 != 0) {
                flg = true
            }
        }
        if (flg || ans < 0) {
            break
        }
        ans++
        dic.add(abc)
        val x = b / 2 + c / 2
        val y = c / 2 + a / 2
        val z = a / 2 + b / 2
        a = x
        b = y
        c = z
    }
    println(ans)
}
