
import java.util.Scanner

import scala.collection.mutable

/**
 *
 */

object Main extends App {
  val sc = new Scanner(System.in)
  val (a, b, c) = (sc.nextInt, sc.nextInt, sc.nextInt)

  val checked = mutable.HashSet[(Int, Int, Int)]()

  def count(a: Int, b: Int, c: Int): Option[Int] = {
    if (checked.contains((a, b, c))) None
    else if(a % 2 == 1 || b % 2 == 1 || c % 2 == 1) Some(0)
    else {
      checked.+=((a, b, c))
      count(b / 2 + c / 2, c / 2 + a / 2, a / 2 + b / 2).map(_ + 1)
    }
  }

  val ans = count(a, b, c)
  println(ans.getOrElse(-1))
}