import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val a, b, c = sc.nextInt()
    if (a == b && b == c && a % 2 == 1) {
      println(0)
    } else if (a == b && b == c && a % 2 == 0) {
      println(-1)
    } else {
      println(f(a, b, c))
    }
  }

  def f(a: Int, b: Int, c: Int): Int = {
    if (!Array(a, b, c).forall(m => m % 2 == 0)) {
      0
    } else {
      1 + f((b + c) / 2, (a + c) / 2, (a + b) / 2)
    }
  }
}
