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

int main()
{
    int a,b,c;
    cin>>a>>b>>c;
    for(int i = 0; i < 5000000; i++)
    {
        if(a%2 == 1 || b%2 == 1 || c%2 == 1)
        {
            cout<<i<<endl;
            return 0;
        }

        int x = (b + c)/2;
        int y = (a + c)/2;
        int z = (a + b) /2;
        a = x, b = y, c = z;


    }
    cout<<-1<<endl;

}
