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