#include <iostream>
using namespace std;

long long a, b, c;
int ans;

int main()
{
    cin >> a >> b >> c;
    while(!(a%2+b%2+c%2) && ans++ < 1000){
        int am = a/2, bm = b/2, cm = c/2;
        a = bm+cm; b = am+cm; c = bm+am;
    }
    cout << (ans == 1001 ? -1 : ans) << endl;
    return 0;
}
