object Main extends App {
  val sc = new java.util.Scanner(System.in) 
  var a = sc.nextLong()
  var b = sc.nextLong()
  var c = sc.nextLong()
  var ans = 0

  if (a == b && b == c) {
    if (a % 2 == 0) {
      println(-1)
    } else {
      println(0)
    }
  } else {
    println(calc(0, a, b, c))
  }
  
  def calc(acc: Int, a: Long, b: Long, c: Long): Int = {
    if (hasOdd(a,b,c)) {
      acc
    } else {
      calc(acc + 1, b/2 + c/2, a/2 + c/2, a/2 + b/2)
    }
  }
  
  def hasOdd(a: Long, b: Long, c: Long): Boolean = {
    a % 2 != 0 || b % 2 != 0 || c % 2 != 0
  }
}