import std.stdio, std.string, std.conv, std.array, std.algorithm;
import std.uni, std.range, std.math, std.container, std.datetime;
import core.bitop, std.typetuple, std.typecons;

immutable long MOD = 1_000_000_007;
alias tie = TypeTuple;
alias triplet = Tuple!(int, int, int);

void main(){
    int a, b, c;
    readVars(a, b, c);

    if (a & 1 || b & 1 || c & 1) {
        writeln(0);
        return;
    }

    if (a == b && b == c) {
        writeln(-1);
        return;
    }

    int ans;

    while(true){
        if (a & 1 || b & 1 || c & 1) {
            writeln(ans);
            return;
        }

        auto tmp1 = (b + c) / 2, tmp2 = (a + c) / 2, tmp3 = (a + b) / 2;
        a = tmp1, b = tmp2, c = tmp3;

        ans++;
    }
}


void readVars(T...)(auto ref T args){
    auto line = readln.split;
    foreach(ref arg ; args){
        arg = line.front.to!(typeof(arg));
        line.popFront;
    }
    if(!line.empty){
        throw new Exception("args num < input num");
    }
}