import std.stdio;
import std.algorithm;
import std.array;
import std.conv;
import std.string;
import std.math;

void main() {
  auto abc = readln.chomp.split.map!(to!int).array;

  long a = abc[0], b = abc[1], c = abc[2];

  if (a == b && b == c && a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
    (-1).writeln;
  }
  else {
    int ans;

    while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
      long tmp = a / 2;
      a /= 2;
      a += c / 2;
      c /= 2;
      c += b / 2;
      b /= 2;
      b += tmp;
      ans++;
    }

    ans.writeln;
  }

  return;
}
