import io.StdIn.readLine
import annotation.tailrec

object Main extends App {
  val Array(a, b, c) = readLine.split(" ").map(_.toLong)

  if (a == b && b == c) println("-1")
  else {
    println(solve(0, a, b, c))
  }

  @tailrec
  def solve(count: Int, a: Long, b: Long, c: Long): Int = {
    if ((a % 2 + b % 2 + c % 2) != 0) count
    else {
      solve(count + 1, (b + c) /2, (c + a) / 2, (a + b) / 2)
    }
  }
}
