#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,x=0;cin>>A>>B>>C;
  if(A==B&&B==C&&A%2==0)cout<<"-1"<<endl;
  else{
    while(A%2==0&&B%2==0&&C%2==0){
      x++;int a=A,b=B,c=C;
      A=(b+c)/2,B=(c+a)/2,C=(a+b)/2;
    }
    cout<<x<<endl;
  }
}