import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    var t = (1..3).map { sc.nextInt() }.sorted()
    val set = HashSet<String>()
    var ans = 0
    while (true) {
        if (t[0] % 2 != 0 || t[1] % 2 != 0 || t[2] % 2 != 0) {
            println(ans)
            return
        }
        if (set.contains(t.joinToString(","))) {
            println(-1)
            return
        }
        set.add(t.joinToString(","))
        val next = listOf(t[0] / 2 + t[1] / 2, t[0] / 2 + t[2] / 2, t[1] / 2 + t[2] / 2).sorted()
        t = next
        ans++
    }
}