#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> m;
int a[5];
int b[5];
int ans;
int cmp(int q, int w) { return q < w; }
int main() {
  cin >> a[0] >> a[1] >> a[2];
  while (1) {
    sort(a, a + 3, cmp);
    if (a[0] % 2 || a[1] % 2 || a[2] % 2) {
      cout << ans << endl;
      return 0;
    }
    if (m.count(make_pair(a[0], a[1])) && m[make_pair(a[0], a[1])] == a[2])
      return 0 * puts("-1");
    m[make_pair(a[0], a[1])] = a[2];
    b[0] = (a[1] + a[2]) / 2;
    b[1] = (a[0] + a[2]) / 2;
    b[2] = (a[1] + a[0]) / 2;
    for (int i = 0; i < 3; i++) a[i] = b[i];
    ans++;
  }
  cout << "-1" << endl;
  system("pause");
  exit(0);
}
