Problem:
 Score : 300 points    Problem Statement Takahashi, Aoki and Snuke love cookies. They have A , B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below:   Each person simultaneously divides his cookies in half and gives one half to each of the other two persons.   This action will be repeated until there is a person with odd number of cookies in hand.  How many times will they repeat this action?
Note that the answer may not be finite.      Constraints  1 ≤ A,B,C ≤ 10^9         Input Input is given from Standard Input in the following format:  A  B  C       Output Print the number of times the action will be performed by the three people, if this number is finite.
If it is infinite, print -1 instead.        Sample Input 1 4 12 20      Sample Output 1 3  Initially, Takahashi, Aoki and Snuke have 4 , 12 and 20 cookies. Then,   After the first action, they have 16 , 12 and 8 .  After the second action, they have 10 , 12 and 14 .  After the third action, they have 13 , 12 and 11 .   Now, Takahashi and Snuke have odd number of cookies, and therefore the answer is 3 .       Sample Input 2 14 14 14      Sample Output 2 -1       Sample Input 3 454 414 444      Sample Output 3 1

Solution (Python):
L = list(map(int, input().split()))
if L[0]%2 == 1 or L[1]%2 == 1 or L[2]%2 == 1:
    print(0)
    exit()

if (L[0]//2)%2 == 1 and (L[1]//2)%2 == 1 and (L[2]//2)%2 == 1:
    print(-1)
    exit()

i = 0
while True:
    i += 1
    L = [L[1]//2+L[2]//2, L[0]//2+L[2]//2, L[0]//2+L[1]//2]
    if L[0]%2 == 1 or L[1]%2 == 1 or L[2]%2 == 1:
        print(i)
        exit()
    if i >= 10**6:
        print(-1)
        exit()

Solution (Python):
L = list(map(int, input().split()))
if L[0]%2 == 1 or L[1]%2 == 1 or L[2]%2 == 1:
    print(0)
    exit()

if (L[0]//2)%2 == 1 and (L[1]//2)%2 == 1 and (L[2]//2)%2 == 1:
    print(-1)
    exit()

i = 0
while True:
    i += 1
    L = [L[1]//2+L[2]//2, L[0]//2+L[2]//2, L[0]//2+L[1]//2]
    if L[0]%2 == 1 or L[1]%2 == 1 or L[2]%2 == 1:
        print(i)
        exit()
    if i >= 10**6:
        print(-1)
        exit()

Solution (Python):
A, B, C = map(int, input().split())

ans = 0
if A&1 or B&1 or C&1:
    print(ans)
    exit(0)

if A == B == C:
    print(-1)
    exit(0)

while True:
    if A&1 or B&1 or C&1:
        break
    nA = B//2 + C//2
    nB = A//2 + C//2
    nC = B//2 + A//2
    ans += 1
    A = nA
    B = nB
    C = nC

print(ans)

Solution (Python):
A,B,C = [int(i) for i in input().split()]
if A == B == C and not A&1:
    print(-1)
    exit()
c = 0
while not (A&1 or B&1 or C&1):
    A,B,C = (B+C)//2, (A+C)//2, (A+B)//2
    c += 1
print(c)

Solution (Python):
import sys
A, B, C = list(map(int, input().split()))
if A % 2 != 0 or B % 2 != 0 or B % 2 != 0:
    print('0')
    sys.exit()
if A == B == C:
    print('-1')
    sys.exit()
cnt = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    _A = A
    _B = B
    _C = C
    A = _B // 2 + _C // 2
    B = _A // 2 + _C // 2
    C = _A // 2 + _B // 2
    cnt += 1
print(cnt)

Solution (Python):
A, B, C = list(map(int, input().split()))

if A == B == C:
    if A % 2 == 0:
        print('-1')
    else:
        print('0')
else:
    count = 0
    for _ in range(10 ** 9):
        if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
            print(count)
            break
        tmp_A = A
        tmp_B = B
        tmp_C = C
        A = (tmp_B + tmp_C) / 2
        B = (tmp_A + tmp_C) / 2
        C = (tmp_B + tmp_A) / 2
        count += 1

Solution (Python):
A,B,C = map(int,input().split())
if A == B and  B == C and C == A:
  print(-1 if A%2==0 else 0 )
else:
  count = 0
  while(A%2==0 and B%2 == 0 and C%2==0):
    A_ = A
    B_ = B
    A = (B+C)/2
    B = (A_+C)/2
    C = (A_+B_)/2
    count+=1
  print(count)

Solution (Python):
import sys
a, b, c = map(int, input().split())

if a == b and b == c:
    print(-1 if a % 2 == 0 else 0)
    sys.exit(0)

i = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a, b, c = (b + c) / 2, (c + a) / 2, (a + b) / 2
    i += 1

print(i)

Solution (Python):

A, B, C = input().split(' ')
count = 0
A = int(A)
B = int(B)
C = int(C)
a = A
b = B
c = C

while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
  N=[]
  N.append(B/2 + C/2)
  N.append(A/2 + C/2)
  N.append(A/2 + B/2)
  A = N[0]
  B = N[1]
  C = N[2]
  count += 1
  if A == a and B == b and C == c:
    print(-1)
    break
else:
  print(count)

Solution (Python):
A,B,C = map(int, input().split())

ans = 0
for ans in range(1000):
    if A&1 or B&1 or C&1:
        print(ans)
        break
    A,B,C = (B+C)//2, (C+A)//2, (A+B)//2
else:
    print(-1)

Solution (Python):
def resolve():
    '''
    code here
    '''
    A, B, C = [int(item) for item in input().split()]
    cnt = 0

    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        A, B, C = B//2 + C//2, A//2 + C//2, A//2 + B//2
        cnt += 1

        if A==B==C:
            cnt = -1
            break

    print(cnt)


if __name__ == "__main__":
    resolve()

Solution (Python):
def main():
    a=tuple(map(int,input().split()))
    e=set()
    while a not in e:
        for x in a:
            if x % 2 != 0:
                print(len(e))
                return
        e.add(a)
        a=((a[1]+a[2])//2,(a[0]+a[2])//2,(a[0]+a[1])//2)
    else:
        print(-1)
    
if __name__ == "__main__":
    main()

Solution (Python):
a,b,c=map(int,input().split());e=a-b|c-b;print(len(bin(e&-e))-3or~c%-2)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|c-b
print(len(bin(e&-e))-3or~c%-2)

Solution (Python):
a, b, c = map(int, input().split())

if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)
    exit()

if a == b and b == c:
    print(-1)
    exit()

cnt = 0

while True:
    cnt += 1
    next_a = b // 2 + c // 2
    next_b = a // 2 + c // 2
    next_c = a // 2 + b // 2
    a = next_a
    b = next_b
    c = next_c
    
    
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        break

print(cnt)

Solution (Python):
a, b, c = map(int, input().split())
if a % 2 or b % 2 or c % 2:
   print(0)
   exit()
if a == b == c:
   print(-1)
   exit()

cnt = 0
while True:
   if a % 2 or b % 2 or c % 2:
      break
   cnt += 1
   next_a = b // 2 + c // 2
   next_b = a // 2 + c // 2
   next_c = a // 2 + b // 2
   a = next_a; b = next_b; c = next_c
print(cnt)

Solution (Python):
a,b,c=map(int,input().split())
ans=0
if a%2==0 and b%2==0 and c%2==0 and a==b and b==c:
    print(-1)
else:
    while True:
        if a%2==0 and b%2==0 and c%2==0:
            ans+=1
            a_tmp=int(a/2)
            b_tmp=int(b/2)
            c_tmp=int(c/2)
            a=b_tmp+c_tmp
            b=a_tmp+c_tmp
            c=b_tmp+b_tmp
        else:
            break
    print(ans)

Solution (Python):
A,B,C = map(int,input().split())

if A == B == C: 
  print(-1 if A%2==0 else 0)
else:
  c = 0
  while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    ba = A
    bb = B
    bc = C
    A = (bb + bc)//2
    B = (ba + bc)//2
    C = (ba + bb)//2
    c+=1
  print(c)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print(len(bin(e&-e))-3-(e==b&1))

Solution (Python):
a,b,c=map(int,input().split())
ans=0
while a%2==0 and b%2==0 and c%2==0:
  d,e,f=0,0,0
  d=(b+c)//2
  e=(a+c)//2
  f=(a+b)//2
  a,b,c=d,e,f
  ans+=1
  if ans==100000:
    ans=(-1)
    break
print(ans)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print(len(bin(e&-e))-3or-(e==b&1))

Solution (Python):
A, B, C = map(int,input().split())

if B %2 != 0:
    print(0)
    exit()
if A == B == C:
    print(-1)
    exit()

x = B/2
cnt = 0
while A % 2 == 0 and C % 2 == 0:
    tmp_a = A
    tmp_c = C
    A = tmp_c/2 + x
    C = tmp_a/2 + x
    cnt += 1
print(cnt)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b&1)*len(f'{e&-e:b}')-1)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b%2)*len(f'{e&-e:b}')-1)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b%2)*len(f'{(e&-e):b}')-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print((e!=0|b%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
if a==b==c:
    if a%2==b%2==c%2==0:
        print(-1)
    else:
        print(0)
    exit()
cnt=0
while a%2==b%2==c%2:
    A=a//2
    B=b//2
    C=c//2
    a,b,c=B+C,A+C,A+B
    cnt+=1
print(cnt)

Solution (Python):
def resolve():
    a, b, c = map(int, input().split())
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(0)
        exit()
    if a == b == c:
        print(-1)
        exit()
    ans = 0
    while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0): 
        a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
        ans += 1
    print(ans)
resolve()

Solution (Python):
a, b, c = map(int, input().split())
 
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)    
    exit() 
    
if a == b == c:
    print(-1)
    exit()
    
cnt = 0
while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0): 
    a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
    cnt += 1
 
print(cnt)

Solution (Python):
a,b,c=map(int,input().split())
e=a-b|b-c
print((e!=b%2)*(e^e-1).bit_length()-1)

Solution (Python):
a, b, c = map(int, input().split())
if a == b == c:
    ans = 0
else:
    ans = 1 << 31
    for x in [a - b, b - c, c - a]:
        if x != 0:
            tmp = 0
            while x % 2 == 0:
                tmp += 1
                x >>= 1
            ans = min(tmp, ans)

if a == b == c and b % 2 == 0:
    print(-1)
else:
    print(ans)

Solution (Python):
a, b, c = map(int, input().split())
if a == b == c:
    ans = 1
else:
    ans = 1 << 31
    for x in [a - b, b - c, c - a]:
        if x != 0:
            tmp = 1
            while x % 2 == 0:
                tmp += 1
                x >>= 1
            ans = min(tmp, ans)

if a == b == c and b % 2 == 0:
    print(-1)
else:
    print(ans - 1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print((e!=0|b%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print((e!=0|b%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print((e!=0|b%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print(bool(e|b%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,input().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,open(0).read().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1)

Solution (Python):
a,b,c=map(int,open(0).read().split())
e=(a-b)|(b-c)
print(bool(e|(a|b|c)%2)*(e^~-e).bit_length()-1)

Solution (Python):
A, B, C = map(int, input().split())

cnt = 0
if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
    print(cnt)
elif A == B == C:
        cnt = -1
        print(cnt)
else:
    while True:
        a, b, c = A, B, C
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        A, B, C = (b + c) / 2, (a + c) / 2, (a + b) / 2
        cnt += 1
    
    print(cnt)

Solution (Python):

A, B, C = map(int, input().split())
if not (A%2 == B%2 == C%2 == 0):
    ans = 0
elif A == B == C:
    ans = -1
else:
    ans = 0
    while A%2 == B%2 == C%2 == 0:
        a = (B+C) // 2
        b = (C+A) // 2
        c = (A+B) // 2
        A = a
        B = b
        C = c
        ans += 1
print(ans)

Solution (Python):
a, b, c = map(int, input().split())
 
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(0)
elif a == b == c:
    print(-1)
else:
    num = 0
    while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
        a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
        num += 1
    print(num)

Solution (Python):
a, b, c = map(int, input().split())
 
if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
    print(0)    
    exit() 
    
if a == b == c:
    print(-1)
    exit()
    
cnt = 0
while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0): 
    a, b, c = (b+c)//2, (a+c)//2, (a+b)//2
    cnt += 1
 
print(cnt)

Solution (Python):
a, b, c = map(int, input().split())
 
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(0)
elif a == b == c:
    print(-1)
else:
    num = 0
    while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
        a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
        num += 1
    print(num)

Solution (Python):
A,B,C=map(int,input().split())

if A==B==C and A%2==0:
    print(-1)
else:
    K=0
    while (A%2)+(B%2)+(C%2)==0:
        A,B,C=(B+C)//2,(C+A)//2,(A+B)//2
        K+=1
    print(K)

Solution (Python):
a, b, c = map(int, input().split())
 
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(0)
elif a == b == c:
    print(-1)
else:
    num = 0
    while (a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
        a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
        num += 1
    print(num)

Solution (Python):
a,b,c = map(int, input().split())
val = 0
if a == b == c and a%2 == 0 and b%2 == 0 and c%2 == 0:
  print(-1)
else:
  while a%2 == 0 and b%2 == 0 and c%2 == 0:
    a,b,c = int((b+c)/2), int((a+c)/2), int((a+b)/2)
    val += 1
  print(val)

Solution (Python):










A, B, C = map(int, input().split())

n = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B and B == C:
        n = -1
        break

    An = (B + C) // 2
    Bn = (A + C) // 2
    Cn = (A + B) // 2

    A = An
    B = Bn
    C = Cn
    n += 1

print(n)

Solution (Python):
a, b, c = map(int, input().split())

if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
    print(0)
elif a == b == c:
    print(-1)
else:
    count = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
        count += 1
    print(count)

Solution (Python):
a, b, c = map(int, input().split())
dic = []
count = 0

while all([a%2 == 0, b%2 == 0, c%2 == 0]):
    a, b, c = int((b+c)/2), int((a+c)/2), int((c+a)/2)
    if (a, b, c) in dic:
        count = -1
        break
    else:
        dic.append((a, b, c))
        count += 1

print(count)

Solution (Python):
import sys
a, b, c = map(int, input().split())
var = 0
for i in range(1000):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(var)
        sys.exit()
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    var += 1
print(-1)

Solution (Python):
a,b,c = map(int,input().split())
ans = 0
for i in range(10000001):
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  if i == 1000000:
    print(-1)
    exit()
  m = a
  n = b
  l = c
  a = (b+c)//2 
  b = (c+m)//2 
  c = (m+n)//2
  ans += 1
print(ans)

Solution (Python):
import sys
a, b, c = [int(w) for w in input().split()]

ans = 0


def is_fin(a, b, c):
    global ans
    if a % 2 or b % 2 or c % 2:
        return True
    elif a == b == c:
        ans = -1
        return True
    else:
        return False


while not is_fin(a, b, c):
    ta = (b+c)/2
    tb = (a+c)/2
    tc = (a + b) / 2
    a, b, c = ta, tb, tc
    ans += 1

print(ans)

Solution (Python):
a, b, c = map(int, input().split())
count = 0
for i in range(10**3):
    if a%2 != 0 or b%2 != 0 or c%2 != 0:
        print(count)
        exit()
    a, b, c = b/2 + c/2, a/2 + c/2, a/2 + b/2
    count += 1
print(-1)

Solution (Python):
a,b,c = map(int,input().split())
ans = 0
for i in range(10000001):
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  if i == 1000000:
    print(-1)
    exit()
  m = a
  n = b
  l = c
  a = (b+c)//2 
  b = (c+m)//2 
  c = (m+n)//2
  ans += 1
print(ans)

Solution (Python):
def check(A,B,C):
  if A==0 or B==0 or C==0:
    return False
  if A%2!=0 or B%2!=0 or C%2!=0:
    return False
  return True

A,B,C=map(int,input().split())
ans=0
if A%2==B%2==C%2==0 and A==B==C:
  print(-1)
  exit()
while check(A,B,C)==True:
  a=B//2+C//2
  b=A//2+C//2
  c=A//2+B//2
  A,B,C=a,b,c
  ans+=1
  if 10**9<ans:
    ans=-1
    break
print(ans)

Solution (Python):
a,b,c=map(int,input().split())
if a==b and a==c and a%2==0:
  print(-1)
else:
  cnt=0
  while a%2==0 and b%2==0 and c%2==0:
    cnt+=1
    k=a
    l=b
    a=(b+c)//2
    b=(k+c)//2
    c=(k+l)//2
  print(cnt)

Solution (Python):
A,B,C = map(int, input().split())
a = [A]
b = [B]
c = [C]
count = 0
sum = A + B + C
for i in range(10 ** 9):

    if a[i] == b[i] == c[i]:
        if a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
            count = -1
            break
        else:
            count = 0
            break
    elif a[i] % 2 == 0 and b[i] % 2 == 0 and c[i] % 2 == 0:
        a.append(b[i] / 2 + c[i] / 2)
        b.append(a[i] / 2 + c[i] / 2)
        c.append(a[i] / 2 + b[i] / 2)
        count += 1
    else:
        break


print(count)

Solution (Python):
A, B, C = map(int, input().split())
if A == B == C:
    if A % 2 == B % 2 == C % 2 == 0:
        print(-1)
    else:
        print(0)
    exit()
cnt = 0
while A % 2 == B % 2 == C % 2:
    a = A // 2
    b = B // 2
    c = C // 2
    A, B, C = b + c, a + c, a + b
    cnt += 1
print(cnt)

Solution (Python):
A,B,C = map(int, input().split())
ctr = 0
if A == B == C and A%2 == 0 and B%2 == 0 and C%2 == 0:
  print(-1)
else:
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    A,B,C = int((B+C)/2), int((A+C)/2), int((A+B)/2)
    ctr += 1
  print(ctr)

Solution (Python):
member = list(map(int, input().split()))

def check_odd():
    for m in member:
        if m % 2 != 0:
            return True
    return False

def check_number():
    num = member[2]
    for i in range(2):
        if num != member[i]:
            return True
    return False

if check_number():
    count = 0
    while True:
        if check_odd():
            break
        else:
            a = member[1] // 2 + member[2] // 2
            b = member[0] // 2 + member[2] // 2
            c = member[0] // 2 + member[1] // 2
            member = [a, b, c]
        count += 1
    print(count)
else:
    if check_odd():
        print(0)
    else:
        print(-1)

Solution (Python):
X=[int(x) for x in input().split()]
count=0
if ((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0 and X[0]==X[1] and X[1]==X[2]):
  count=-1
else:
  while((X[0]%2-1)*(X[1]%2-1)*(X[2]%2-1)!=0):
    Y=[0,0,0]
    Y[0]=(X[1]+X[2])/2
    Y[1]=(X[0]+X[2])/2
    Y[2]=(X[1]+X[0])/2
    X=Y
    count =count+1
print(count)

Solution (Python):
a, b, c = map(int, input().split())

count = 0

while True:  
  if a%2 == b%2 == c%2 == 0:
    if a == b == c:
      print(-1)
      exit()
    a, b, c = (b+c)/2, (a+c)/2, (a+b)/2
    count += 1
  else:
    break

print(count)

Solution (Python):
List=list(map(int,input().split()))
cnt=0
while(all(i%2==0 for i in List)):
    if List[0]==List[1]==List[2]:
        print(-1)
        exit()
    old_list=[List[0]//2,List[1]//2,List[2]//2]
    List[0]=old_list[1]+old_list[2]
    List[1]=old_list[0]+old_list[2]
    List[2]=old_list[0]+old_list[1]
    cnt+=1
print(cnt)

Solution (Python):
A,B,C = map(int,input().split())
count=0
if A==B==C and A%2==0 :
    print(-1)
elif A==B==C and A%2==1 :
    print(0)
else :
    while True :
        if A%2 != 0 or B%2 != 0 or C%2 != 0 :
            print(count)
            break
        elif A==B and B==C :
            print(-1)
            break
        else :
            count += 1
            dA=A
            dB=B
            dC=C
            A=dB/2+dC/2
            B=dA/2+dC/2
            C=dA/2+dB/2

Solution (Python):
a,b,c = map(int,input().split())
r = 0
if a == b == c:
  if a%2 == 1:
    print(r)
    exit()
  else:
    print(-1)
    exit()

while True:
  if a%2 == 1 or b%2 == 1 or c%2 == 1:
    break
  r += 1
  aa = (b+c)//2
  bb = (a+c)//2
  cc = (a+b)//2
  a,b,c = aa,bb,cc

print(r)

Solution (Python):
def ave(b,c):
    return b//2 + c//2
def rest(a,b,c):
    return ave(b,c), ave(a,c), ave(b,a)
a, b, c = map(int, input().split())
ans = 0
while 1:
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1 :
        print(ans)
        break
    d, e, f = rest(a,b,c)
    if (a, b, c) == (d, e, f):
        print(-1)
        break
    ans += 1
    a, b, c = d, e, f

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, C = map(int, read().split())

for t in range(1000):
    if A & 1 or B & 1 or C & 1:
        break
    A, B, C = A // 2, B // 2, C // 2
    A, B, C = B + C, C + A, A + B

t = -1 if t > 100 else t
print(t)

Solution (Python):
def solve(a, b, c):
    if any(i % 2 == 1 for i in [a, b, c]):
        return 0
    if a == b == c:
        return -1
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
    return solve(a, b, c) + 1

a, b, c = map(int, input().split())

print(solve(a, b, c))

Solution (Python):
a, b, c = map(int, input().split())

if any(i % 2 != 0 for i in [a, b, c]):
    print(0)
    exit()

if a == b and b == c:
    print(-1)
    exit()

cnt = 0
a_list = [0]*(1001001)
b_list = [0]*(1001001)
c_list = [0]*(1001001)
a_list[0] = a
b_list[0] = b
c_list[0] = c

for i in range(1, 1001001):
    a_list[i] = (b_list[i-1] + c_list[i-1]) // 2
    b_list[i] = (c_list[i-1] + a_list[i-1]) // 2
    c_list[i] = (a_list[i-1] + b_list[i-1]) // 2
    cnt += 1
    if a_list[i] % 2 != 0 or b_list[i] % 2 != 0 or c_list[i] % 2 != 0:
        break

print(cnt)

Solution (Python):
A,B,C = map(int,input().split())
ans = 0
if A == B == C:
  if A%2 != 0 or B%2 != 0 or C%2 != 0:
    pass
  else:
    ans = -1
else:
  while A%2 == 0 and B%2 == 0 and C%2 == 0:
    A,B,C = B//2+C//2,A//2+C//2,A//2+B//2
    ans += 1
print(ans)

Solution (Python):
cookie = list(map(int,input().split()))
odd = False
cnt = 0
if cookie[0]%2==1 or cookie[1]%2== 1 or cookie[2]%2==1:
    print(0)
elif len(list(set(cookie))) == 1:
    print('-1')
else:
    while not odd:
        tmp = [0 for i in range(3)]
        for i in range(3):
            ix = list(set([0,1,2]) - set([i]))
            tmp[ix[0]] += cookie[i] / 2
            tmp[ix[1]] += cookie[i] / 2
        for i in tmp:
            if not i % 2 == 0:
                odd = True
        cookie = tmp
        cnt += 1
    print(cnt)

Solution (Python):
a, b, c = map(int,input().split())
k = 1
ans = 0

for i in range(40):
    if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        d = a // 2
        e = b // 2
        f = c // 2
        a = e + f
        b = d + f
        c = d + e
        ans += 1
    else:
        k = 0
        break

if k == 1:
    print(-1)
else:
    print(ans)

Solution (Python):

a,b,c = map(int,input().split())

count = 0
for i in range(100):
    if a%2==1 or b%2==1 or c%2==1:
        break

    count = count + 1
    a_new = (b+c)/2
    b_new = (a + c) / 2
    c_new = (a + b) / 2

    a = a_new
    b = b_new
    c = c_new
    if i == 99:
        count = -1
print(count)

Solution (Python):
A, B, C = [int(x) for x in input().split()]
ans = 0
while True:
    if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
        break
    elif A == B == C:
        ans = -1
        break
    ans += 1
    A, B, C = (B + C) // 2, (A + C) // 2, (A + B) // 2

print(ans)

Solution (Python):
a,b,c=map(int,input().split())
tmpa=0
ampb=0
tmpc=0

if a%2==1 or b%2==1 or c%2==1:
    print(0)
    exit()

for i in range(10**5):
    tmpa=(b+c)/2
    tmpb=(a+c)/2
    tmpc=(b+a)/2
    a=tmpa
    b=tmpb
    c=tmpc
    if a%2==1 or b%2==1 or c%2==1:
        print(i+1)
        exit()
print(-1)

Solution (Python):
A, B, C = map(int, input().split())
ans = 0
if A == B and B == C and A%2 == 0:
    print(-1)
else:
    while A%2 == 0 and B%2 == 0 and C%2 == 0:
        ans += 1
        A, B, C = B//2+C//2, A//2+C//2, A//2+B//2
    print(ans)

Solution (Python):
a,b,c = map(int,input().split())
if a==b==c and a%2==1:
    print(0)
elif a==b==c and a%2==0:
    print("-1")
else:
    cnt = 0
    while all(i&1==0 for i in [a,b,c]):
        A = a
        B = b
        C = c
        a = (B+C)//2
        b = (A+C)//2
        c = (A+B)//2
        cnt += 1
    print(cnt)

Solution (Python):
a,b,c = map(int,input().split())
if a==b==c and a%2==1:
    print(0)
elif a==b==c and a%2==0:
    print("-1")
else:
    cnt = 0
    while all(i&1==0 for i in [a,b,c]):
        A = a
        B = b
        C = c
        
        
        a = (B+C)//2
        b = (A+C)//2
        c = (A+B)//2
        cnt += 1
    print(cnt)

Solution (Python):
cookie = list(map(int, input().split()))
sc = sum(cookie)
cnt = 0
if cookie[0] == cookie[1] and cookie[1] == cookie[2] and cookie[0]%2 == 0:
    print(-1)
    exit()
memo = [0]*3
while cookie[0]%2 == 0 and cookie[1]%2 == 0 and cookie[2]%2 == 0:
    memo[0] = (cookie[1] + cookie[2]) // 2
    memo[1] = (cookie[0] + cookie[2]) // 2
    memo[2] = (cookie[1] + cookie[0]) // 2
    for i in range(3):
        cookie[i] = memo[i]
    cnt += 1

print(cnt)

Solution (Python):
def change(A,B,C):
    a=B/2+C/2
    b=A/2+C/2
    c=A/2+B/2
    return a,b,c
A,B,C=map(int,input().split())
a=A
b=B
c=C
if (A%2==1)|(B%2==1)|(C%2==1):
    print(0)
else:
    count=0
    while True:
        A,B,C=change(A,B,C)
        count+=1
        if (A%2==1)|(B%2==1)|(C%2==1):
            print(count)
            break
        elif (a==A)&(b==B)&(c==C):
            print(-1)
            break

Solution (Python):
a,b,c = tuple(map(int,input().split()))

ans = 0
while True:
  if len(set((a,b,c)))==1:
    if a%2==1:
      print(0)
      exit()
    print(-1)
    exit()
  if a%2==0 and b%2==0 and c%2==0:
    a,b,c = b//2+c//2,c//2+a//2,a//2+b//2
    ans+=1
  else:
    break
print(ans)

Solution (Python):
A,B,C = map(int,input().split())
count=0
if A==B==C and A%2==0 :
    print(-1)
elif A==B==C and A%2==1 :
    print(0)
else :
    while True :
        if A%2 != 0 or B%2 != 0 or C%2 != 0 :
            print(count)
            break
        elif A==B and B==C :
            print(-1)
            break
        else :
            count += 1
            dA=A
            dB=B
            dC=C
            A=dB/2+dC/2
            B=dA/2+dC/2
            C=dA/2+dB/2

Solution (Python):
A,B,C = list(map(int,input().split()))
if A == B == C and A%2 == 0 :
    print(-1)
elif A == B == C and A%2 == 1 :
    print(0)
else :
    cnt=0
    while A%2==B%2==C%2==0:
        total=A+B+C
        A=total//2-A//2
        B=total//2-B//2
        C=total//2-C//2
        cnt+=1
    print(cnt)

Solution (Python):
A, B, C = map(int, input().split())


count = 0
while True:
    if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
        print(count)
        break
    if A == B == C:
        print(-1)
        break
    A, B, C = B // 2 + C // 2, A // 2 + C // 2, A // 2 + B // 2
    count += 1

Solution (Python):
def calculate(A, B, C):
    for i in range(1000):
        if A % 2 == 1 or B % 2 == 1 or C % 2 == 1:
            return i
        else:
            _A = (B + C) // 2
            _B = (A + C) // 2
            _C = (A + B) // 2
            A, B, C = _A, _B, _C
    return -1

A, B, C = map(int, input().split())
print(calculate(A, B, C))