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

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int a, int b, int c) {
    if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) return 0;
    if (a == b && b == c) return -1;

    return calc((b + c) / 2, (a + c) / 2, (a + b) / 2) + 1;
}

void main() {
    auto abc = readints;
    int a = abc[0], b = abc[1], c = abc[2];
    writeln(calc(a, b, c));
}
