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