//created by missever
#include<bits/stdc++.h>
#define MAX 1000000007
using namespace std;
typedef long long LL;
typedef pair<int,int> P;
typedef pair<int,P> PI;
set<PI> q;
int main() {
int a,b,c;
int d,e,f,t = 0;;
scanf("%d%d%d",&a,&b,&c);
d = min(a,min(b,c));
f = max(a,max(b,c));
e = 1LL * a + b + c - d - f;
while(1) {
if((a & 1) || (b & 1) || (c & 1)) {
printf("%d\n",t);
return 0;
}
d /= 2;
e /= 2;
f /= 2;
a = d + e;
b = d + f;
c = e + f;
d = min(a,min(b,c));
f = max(a,max(b,c));
e = 1LL * a + b + c - d - f;
if(q.find(PI(d,P(e,f))) != q.end()) break;
q.insert(PI(d,P(e,f)));
t++;
}
printf("-1\n");
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:15:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&a,&b,&c);
^