import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val A, B, C = sc.nextInt

  val z = if (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) {
    if (A == B && B == C) -1
    else {
      var a = A
      var b = B
      var c = C
      var i = 0

      while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
        i += 1
        val a2 = a / 2
        val b2 = b / 2
        val c2 = c / 2
        a = b2 + c2
        b = a2 + c2
        c = a2 + b2
      }

      i
    }
  } else 0
  println(z)
}
