import java.util.*

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

  println(agc014a(a, b, c))
}

private fun agc014a(a: Int, b: Int, c: Int): Int {
  var tmpa = a
  var tmpb = b
  var tmpc = c
  var count = 0
  while (tmpa % 2 == 0 && tmpb % 2 == 0 && tmpc % 2 == 0) {
    count++
    val aa = tmpb / 2 + tmpc / 2
    val bb = tmpa / 2 + tmpc / 2
    val cc = tmpb / 2 + tmpa / 2
    tmpa = aa
    tmpb = bb
    tmpc = cc

    if (tmpa == a && tmpb == b && tmpc == c) return -1
  }

  return count
}
