#include <iostream>
using namespace std;
int main(void){
    int a,b,c,a1,b1,c1,ans=0;
    cin>>a>>b>>c;
    while(a%2==0&&b%2==0&&c%2==0){
        if(a==b&&b==c){cout<<-1<<endl;return 0;}
        a1=a,b1=b,c1=c;
        a=(b1+c1)/2,b=(a1+c1)/2,c=(a1+b1)/2;
        ans++;
        //cout<<a<<b<<c<<endl;
    }
    
    cout<<ans<<endl;
}
