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

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  
  if(a==b&&b==c&&a%2==0)
    cout << -1 << endl;
  else{
    int i=0;
    while(a%2==0&&b%2==0&&c%2==0){
      int x=a/2;
      a=a/2+b/2;
      b=b/2+c/2;
      c=c/2+x;
      i++;
    }
    cout << i << endl;
  }
}