#include <bits/stdc++.h>
using namespace std;

#define fi freopen("i.txt", "r", stdin)
#define fo freopen("o.txt", "w", stdout)
#define SIO ios_base :: sync_with_stdio(false); cin.tie(0)
#define fs first
#define sc second
#define cn(a) cin >> a
#define cn2(a, b) cin >> a >> b
#define cn3(a, b, c) cin >> a >> b >> c
#define cn4(a, b, c, d) cin >> a >> b >> c >> d
#define sf(a) scanf("%d", &a)
#define sf2(a, b) scanf("%d %d", &a, &b)
#define sf3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define sf4(a, b, c, d) scanf("%d %d %d %d", &a, &b, &c, &d)
#define sfl(a) scanf("%lld", &a)
#define sfl2(a, b) scanf("%lld %lld", &a, &b)
#define sfl3(a, b, c) scanf("%lld %lld %lld", &a, &b, &c)
#define sfl4(a, b, c, d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define pnl() putchar('\n')
#define fli(i, a, b, c) for(int i = a; i < b; i += c)
#define flie(i, a, b, c) for(int i = a; i <= b; i += c)
#define fls(i, a, b) for(int i = a; i < b; i++)
#define flse(i, a, b) for(int i = a; i <= b; i++)
#define fl(i, n) fls(i, 0, n)
#define fle(i, n) flse(i, 1, n)
#define ll long long
#define ld long double
#define vi vector <int>
#define vll vector <ll>
#define ii pair <int, int>
#define pll pair <ll, ll>
#define iii pair <int, pair <int, int> >
#define lll pair <ll, pair <ll, ll> >
#define vii vector <ii>
#define vpll vector <pll>
#define vlll vector <lll>
#define pb push_back
#define ins insert
#define fr front
#define mp make_pair
#define PI acos(-1.0)
#define INF 10000000
#define LINF 1000000000000
#define piiii pair <ii, ii>
#define sq(a) a * a
#define MOD 1000000007
#define all(x) x.begin(), x.end()
#define gc() getchar()
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define matrixCh vector <vector <char> >
#define matrixInt vector <vector <int> >

//int main()
//{
//    ll arr[3];
//    cin >> arr[0] >> arr[1] >> arr[2];
//
//    if(arr[0] == arr[1] && arr[1] == arr[2])
//    {
//        cout << -1 << endl;
//        return 0;
//    }
//
//    if((arr[0] & 1) || (arr[1] & 1) || (arr[2] & 1))
//    {
//        cout << 0 << endl;
//        return 0;
//    }
//
////    sort(arr, arr + 3);
//    ll p = arr[2], s = 0;
//
////    unordered_set <string> hv;
////    stringstream ss;
////    ss << a << " " << b << " " << c;
////    string s;
////    getline(ss, s);
////    hv.insert(s);
//
//    while(true)
//    {
//        ll x = (arr[1] + arr[2]) / 2LL;
//        ll y = (arr[0] + arr[2]) / 2LL;
//        ll z = (arr[0] + arr[1]) / 2LL;
//        arr[0] = x, arr[1] = y, arr[2] = z;
//        ++s;
//
//        if(arr[0] == arr[1] && arr[1] == arr[2])
//        {
//            cout << -1 << endl;
//            return 0;
//        }
//
//        if((arr[0] & 1) || (arr[1] & 1) || (arr[2] & 1))
//        {
//            cout << s << endl;
//            return 0;
//        }
//
//        if(s == 10000000)
//        {
//            cout << -1 << endl;
//            return 0;
//        }
//
////        ss.clear();
////        ss << a << " " << b << " " << c;
////        getline(ss, s);
////
////        if(hv.count(s))
////        {
////            cout << -1 << endl;
////            return 0;
////        }
////
////        hv.insert(s);
//    }
//
//    return 0;
//}

int main()
{
    int a, b, c, i = 0;
    cin >> a >> b >> c;

    while(!(a & 1) && !(b & 1) && !(c & 1))
    {
        int x = (b + c) >> 1;
        int y = (a + c) >> 1;
        int z = (a + b) >> 1;
        a = x, b = y, c = z, i++;

        if(i == 10000007)
        {
            cout << -1 << endl;
            return 0;
        }
    }

    cout << i << endl;
    return 0;
}


Measured memory_bytes: 256