#include <bits/stdc++.h>
using namespace std;typedef long long ll;
int main(){
  ll a, b, c, ans = 0;
  cin >> a >> b >>c;
  while ((a%2+1)*(b%2+1)*(c%2+1)==1) {
    ll A = a, B = b;
    a = B/2+c/2;
    b = A/2+c/2;
    c = A/2+B/2;
    ans++;
    if (ans > 10000000) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << ans << endl;
}