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):
a,b,c = map(int,input().split())

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

Solution (Python):
A, B, C = map(int, input().split())
T = [A, B, C]
T.sort()
count = 0

def trade(T, count):
    Ts = [0]*3
    if T[0] == T[1] == T[2] and T[0]%2==0:
        return -1
    elif T[0]%2 != 0 or T[1]%2 != 0 or T[2]%2 != 0:
        return count
    else:
        count += 1
        Ts[0] = (T[1]+T[2])/2
        Ts[1] = (T[0]+T[2])/2
        Ts[2] = (T[0]+T[1])/2
        return trade(Ts, count)

print(trade(T, count))

Solution (Python):
a,b,c=map(int,input().rstrip().split(' '))
if(a==b and b==c):
	if(a%2==0):
		print(-1)
	else:
		print(0)
else:
	n=0
	while(a%2==0 and b%2==0 and c%2==0):
		n+=1
		tmp_a=(b+c)/2
		tmp_b=(a+c)/2
		tmp_c=(b+a)/2
		a=tmp_a
		b=tmp_b
		c=tmp_c
	print(n)

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

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

Solution (Python):
import numpy as np
cookies = np.array([int(x) for x in input().split()])

if any(cookies%2):
  ans = 0
elif cookies[0] == cookies[1] == cookies[2]:
  ans = -1
else:
  ans = 0
  while True:
    if not any(cookies%2):
      cookies = cookies//2
      ans += 1
      continue
    if all(cookies%2):
      ans += 1
    break
print(ans)

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

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b == c:
        print(-1)
        quit()
ans = 0
a_n = 0
b_n = 0
c_n = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    a_n = (b+c)//2
    b_n = (a+c)//2
    c_n = (a+c)//2
    a = a_n
    b = b_n
    c = c_n
    ans += 1
print(ans)

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

Solution (Python):
l = list(map(int,input().split()))
count = 0
while True:
    if l[0] == l[1] == l[2]:
        if l[1]%2 == 0:
            print(-1)
            exit()
    for i in range(3):
        if l[i]%2 == 1:
            print(count)
            exit()
    count += 1
    l[0],l[1],l[2] = (l[1]+l[2])//2,(l[0]+l[2])//2,(l[1]+l[0])//2

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

cnt = 0

if a==b==c and a%2==0:
  print("-1")
  exit()
  
for i in range(10**6):
  if a%2==0 and b%2==0 and c%2==0:
    tmpA = b/2 + c/2
    tmpB = a/2 + c/2
    tmpC = a/2 + b/2
    a = tmpA
    b = tmpB
    c = tmpC
    cnt +=1
  else:
    print(cnt)
    break

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

if a[0] % 2 == 1 or a[1] % 2 == 1 or a[2] % 2 == 1:
    print(0)
    exit()

cnt = 0
for _ in range(1000):
    for i in a:
        if i % 2 == 1:
            print(cnt)
            exit()
    a[0], a[1], a[2] = a[1] // 2 + a[2] // 2, a[0] // 2 + a[2] // 2, a[0] // 2 + a[1] // 2
    cnt += 1
else:
    print(-1)

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

Solution (Python):
a,b,c=map(int,input().split())
if any([a%2==1,b%2==1,c%2==1])==True:
    print(0)
else:
    if len(set({a,b,c}))==1:
        print(-1)
    else:
        res=0
        while all([a%2==0,b%2==0,c%2==0]):
            a,b,c=(b+c)//2,(a+c)//2,(a+b)//2
            res+=1
        print(res)

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def func(a, b, c):
    if a%2 == 1 or b%2 == 1 or c%2 ==1:
        return 0
    if a == b and a == c:
        return -1
    return func((b+c)//2, (c+a)//2, (a+b)//2) + 1

a, b, c= inpl()
ans = func(a, b, c)
print(ans)

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

cnt = 0

f_a = a
f_b = b
f_c = c

while(a%2==0 and b%2==0 and c%2==0):
    t_a = a
    t_b = b
    t_c = c
    a = (t_b+t_c)/2
    b = (t_c+t_a)/2
    c = (t_a+t_b)/2
    cnt += 1
    if (a == f_a and b == f_b and c == f_c):
        cnt = -1
        break


print(cnt)

Solution (Python):
if __name__ == "__main__":
    a, b, c = map(int, input().split())

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

    ans = 0
    while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        a_tmp = (b+c)//2
        b_tmp = (a+c)//2
        c_tmp = (c+a)//2
        a = a_tmp
        b = b_tmp
        c = c_tmp
        ans += 1

    print(ans)

Solution (Python):
i = 0

def cookie(a, b, c):
    global i
    if a == b and b == c:
        return -1
    elif a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
        i += 1
        cookie((b+c)//2, (a+c)//2, (a+b)//2)
        return i

A, B, C = map(int, input().split())
if A % 2 != 0 or B % 2 != 0 or C % 2 != 0:
    print(0)
else:
    print(cookie(A, B, C))

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

flag = 0
ans = 0

if a == b == c and a%2 == 0:
  ans = -1

else:
  while flag == 0:
    if a%2 == 0 and b%2 == 0 and c%2 == 0:
      a_tmp = (b+c)/2
      b_tmp = (a+c)/2
      c_tmp = (a+b)/2
      
      a = a_tmp
      b = b_tmp
      c = c_tmp
      
      ans += 1
      
    else:
      flag = 1

print(ans)

Solution (Python):

A, B, C = map(int,input().split())
cnt = 0
inf = 10**2
for i in range(inf):
    if A%2==0 and B%2==0 and C%2==0: 
        a = (B+C)//2
        b = (A+C)//2
        c = (B+A)//2
        A = a
        B = b
        C = c
        cnt += 1
    else:
        break
if cnt == inf:
    cnt = -1
print(cnt)

Solution (Python):

A, B, C = map(int,input().split())
cnt = 0
inf = 10**6
for i in range(inf):
    if A%2==0 and B%2==0 and C%2==0: 
        a = (B+C)//2
        b = (A+C)//2
        c = (B+A)//2
        A = a
        B = b
        C = c
        cnt += 1
    else:
        break
if cnt == inf:
    cnt = -1
print(cnt)

Solution (Python):

a, b, c = map(int, input().split())
if True:
    cnt = 0
    while True:
        if a % 2 or b % 2 or c % 2:
            break
        if cnt > 10 ** 3:
            break
        cnt += 1
        a, b, c = (b + c) // 2, (a + c) // 2, (a + b) // 2
    if cnt < 10 ** 3:
        print(cnt)
    else:
        print(-1)

Solution (Python):



import sys
input = sys.stdin.readline

def main():
    A, B, C = map(int, input().split())
    ret = 0
    while True:
        if A%2!=0 or B%2!=0 or C%2!=0:
            break
        elif A==B and B==C:
            ret = -1
            break
        else:
            A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
            ret += 1
    print(ret)

if __name__ == '__main__':
    main()

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

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

ListA = [A]*10000
ListB = [B]*10000
ListC = [C]*10000

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

for i in range (1, 10000):
	ListA[i]= ListB[i-1]/2+ListC[i-1]/2
	ListB[i]= ListA[i-1]/2+ListC[i-1]/2
	ListC[i]= ListA[i-1]/2+ListB[i-1]/2
	if ListA[i]%2==1 or ListB[i]%2==1 or ListC[i]%2==1:
			print(i)
			exit()

print(-1)

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a,b,c=map(int,input().split())
    cunt=0
    if a==b and b==c and a%2==0:
        print(-1)
        sys.exit()
    while True:
        if a%2 or b%2 or c%2:
            print(cunt)
            break
        cunt+=1
        a1,b1,c1=a,b,c
        a=(b1+c1)//2
        b=(a1+c1)//2
        c=(a1+b1)//2

if __name__=='__main__':
    main()

Solution (Python):
a, b, c = (int(x) for x in input().split())
if any([a%2==1, b%2==1, c%2==1]) == True:
  print(0)
else:
  if len(set({a, b, c})) == 1:
    print(-1)
  else:
    res = 0
    while all([a%2==0, b%2==0, c%2==0]):
      a, b, c = (b + c)//2, (c + a)//2, (a + b)//2
      res += 1
    print(res)

Solution (Python):
a,b,c=map(int,input().split())
num=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)
  num+=1
  if (num>10**7):
    print(-1)
    break
else:
  print(num)

Solution (Python):
A, B, C = map(int, 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 cnt >= 10 * 7:
        print(-1)
        break
else:
    print(cnt)

Solution (Python):
A, B, C = map(int, input().split())
cnt=0
memo=[]
while True:
    tmp = (A,B,C)
    if (A%2==0 and B%2==0 and C%2==0):
        if tmp not in memo:
            memo.append(tmp)
            cnt+=1
            A,B,C = (B+C)//2, (C+A)//2, (A+B)//2
        else:
            cnt=-1
            break
    else:
        break
print(cnt)

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

ans = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    if A == B and A == C:
        print(-1)
        exit()
    a = (B+C)//2
    b = (A+C)//2
    c = (A+B)//2
    A = a
    B = b
    C = c
    ans += 1

print(ans)

Solution (Python):
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

a, b, c = na()

if a % 2 == 0 and b % 2 == 0 and c % 2 == 0 and a == b and b == c:
    print(-1)
    exit(0)
ans = 0
while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    ta = b // 2 + c // 2
    tb = a // 2 + c // 2
    tc = a // 2 + b // 2
    a, b, c = ta, tb, tc
    ans += 1

print(ans)

Solution (Python):












A,B,C = map(int,input().split())
lis = [A,B,C]
lis.sort()

check = [lis]
ans = 0

while not(check[-1][0]%2==1 or check[-1][1]%2==1 or check[-1][2]%2==1):
    A,B,C = B//2 + C//2 , A//2 + C//2,B//2 + A//2
    temp = [A,B,C]
    temp.sort()
    if temp in check:
        print(-1)
        exit()
    check.append(temp)
    ans += 1

print(ans)

Solution (Python):
a,b,c = map(int,input().split())
cnt=0
if a==b==c and a%2==0:
    cnt = -1
else:
    for i in range(100):
        if a%2==0 and b%2==0 and c%2==0:
            t_a = b//2 + c//2
            t_b = a//2 + c//2
            t_c = a//2 + b//2
            a,b,c = t_a,t_b,t_c
            cnt+=1
        else:
            break
print(cnt)

Solution (Python):



import sys
input = sys.stdin.readline

def main():
    A, B, C = map(int, input().split())
    ret = 0
    while True:
        if A%2!=0 or B%2!=0 or C%2!=0:
            break
        elif A==B and B==C:
            ret = -1
            break
        else:
            A, B, C = (B+C)//2, (C+A)//2, (A+B)//2
            ret += 1
    print(ret)

if __name__ == '__main__':
    main()

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:
  ans=0
  while a%2==0 and b%2==0 and c%2==0:
    ans+=1
    a1=(b+c)//2
    b1=(c+a)//2
    c1=(a+b)//2
    a=a1
    b=b1
    c=c1
  print(ans)

Solution (Python):
import math

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

cnt = 0

if a == b == c and (a+b+c)%2 == 0:
    print(-1)
    exit()
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
        cnt += 1
print(cnt)

Solution (Python):
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

a,b,c = map(int,input().split())
if a%2 == 0 and b%2 == 0 and c%2 == 0 and a == b and b == c:
    print(-1)
    sys.exit()
else:
    cnt = 0
    while True:
        if a%2 == 1 or b%2 ==1 or c%2 == 1:
            break
        a,b,c = b//2 + c//2,a//2+c//2,a//2+b//2
        cnt += 1    
    print(cnt)

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

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

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

count = 0

while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b and b == c:
        count = -1
        break

    count += 1
    a1 = b // 2 + c // 2
    b1 = c // 2 + a // 2
    c1 = a // 2 + b // 2

    a, b, c = a1, b1, c1

print(count)

Solution (Python):
import numpy as np
p = np.array(list(map(int, input().split())))

cnt = 0
mem = []
flag = True
while (p % 2).sum() == 0:
    a = p[1] // 2 + p[2] // 2
    b = p[0] // 2 + p[2] // 2
    c = p[1] // 2 + p[0] // 2
    
    p = np.array([a, b, c])
    if (a,b,c) in mem:
        flag = False
        break
    else:
        mem.append((a,b,c))
        
    cnt += 1

print(cnt if flag else -1)

Solution (Python):


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

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

    print(ans)

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

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

Solution (Python):
a,b,c = map(int,input().split())
ans = 0
while True:
    if a%2 ==1 or b%2 == 1 or c%2 == 1:
        ans = 0
        break
    ans+=1
    na = (b+c)//2
    nb = (c+a)//2
    nc = (a+b)//2
    if a == b and b == c:
        ans = -1
        break
    if na%2 == 1 or nb%2 == 1 or nc%2 == 1:
        break
    a,b,c, = na,nb,nc
print(ans)

Solution (Python):
x,y,z= map(int,input().split())
A = []
ans = 0
A.append([x,y,z])
while True:
    if x%2==0 and y%2==0 and z%2==0:
        ans+=1
        x,y,z=((y+z)//2),((z+x)//2),((y+x)//2)
        
        if [x,y,z] in A:
        	ans = -1
        	break
        
    
    A.append([x,y,z])
    if x%2==0 and y%2==0 and z%2==0:
        continue
    else:
      break
    
print(ans)

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:
        break
    else:
        tmp_a = (b+c) / 2
        tmp_b = (a+c) / 2
        tmp_c = (a+b) / 2
        if tmp_a == tmp_b == tmp_c:
            print(-1)
            exit()
        else:
            a = tmp_a
            b = tmp_b
            c = tmp_c
            count += 1

print(count)

Solution (Python):
from time import time
t = time()
count = 0
a,b,c = map(int,input().split())
while True:
    if a % 2 != 0 or b % 2 != 0 or c % 2 != 0:
        print(count)
        exit()
    count += 1
    a1 = b//2+c//2
    b1 = c//2+a//2
    c1 = a//2+b//2
    a = a1
    b = b1
    c = c1
    if time()-t >= 1.8:
        print(-1)
        exit()

Solution (Python):

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

if a == b == c and a % 2 == 0:
    print(-1)
else:
    ans = 0
    while True:
        
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            print(ans)
            break
        else:
            ans += 1
            tmpa = a
            tmpb = b
            tmpc = c
            a = tmpb // 2 + tmpc // 2 - tmpa
            b = tmpa // 2 + tmpc // 2 - tmpb
            c = tmpa // 2 + tmpb // 2 - tmpc

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

cnt = 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 = A
        b = B
        c = C
        cnt += 1
        A = (b+c) // 2
        B = (c+a) // 2
        C = (a+b) // 2
    print(cnt)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b,c=MI()
	ta,tb,tc=a,b,c
	ch = False
	cnt = 0
	while a%2==0 and b%2==0 and c%2==0:
		a,b,c=1/2*(b+c),1/2*(a+c),1/2*(b+a)
		if(a==ta and b==tb and c==tc):
			ch = True
			break
		cnt+=1
	if ch:
		print(-1)
	else:
		print(cnt)


if __name__ == '__main__':
	main()

Solution (Python):
ms = list(map(int,input().split()))
if len(set(ms))==1 and ms[0]%2==0:
    print(-1)
else:
    ans=0
    while(all([i%2==0 for i in ms])):
        l = [0]*3
        for i in range(3):
            x = ms[i]/2
            if i==0:
                l[1]+=x
                l[2]+=x
            elif i==1:
                l[0]+=x
                l[2]+=x
            elif i==2:
                l[0]+=x
                l[1]+=x
        ms = l[:]
        ans+=1
    print(ans)

Solution (Python):
import sys

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

a1 = a
b1 = b
c1 = c
cnt = 0
while (a1%2 ==0) and (b1%2 == 0) and (c1%2 == 0):
    a1,b1,c1 = b1//2 + c1//2, c1//2 + a1//2, a1//2 + b1//2
    cnt += 1
    if (a1 == a) and (b1 == b) and (c1 == c):
        print(-1)
        sys.exit()

print(cnt)

Solution (Python):
def mapint_inp():
    return map(int, input().split())

A, B, C = mapint_inp()

ans = 0
while(1):
    if A%2==1 or B%2==1 or C%2==1:
        break
    if A == B and B == C:
        ans = -1
        break
    halvedA = A//2
    halvedB = B//2
    halvedC = C//2
    A = halvedB+halvedC
    B = halvedA+halvedC
    C = halvedA+halvedB
    ans+=1

print(ans)

Solution (Python):
A,B,C=[int(s) for s in input().split(" ")]

A=[A]
B=[B]
C=[C]

Count=0
for i in range(1000000000):
    A.append(B[i]//2+C[i]//2)
    B.append(A[i]//2+C[i]//2)
    C.append(B[i]//2+A[i]//2)
    Count+=1
    if A[i+1]%2!=0 or B[i+1]%2!=0 or C[i+1]%2!=0:
        break
    if Count>=100000:
        Count=-1
        break
       
    
print(0 if A[0]%2!=0 or B[0]%2!=0 or C[0]%2!=0 else Count)

Solution (Python):
a, b, c = map(int, input().split())
n = 0
while True:
  if a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b == c:
      n = -1
      break
    else:
      a1 = a / 2
      b1 = b / 2
      c1 = c / 2
      a = b1 + c1
      b = a1 + c1
      c = a1 + b1
      n += 1
  else:
    break
print(n)

Solution (Python):
import sys
a,b,c = map(int,input().split())
if a == b == c and a%2 == b%2 == c%2== 0:
    print(-1)
    sys.exit()
count = 0
while a%2 == 0 and b%2 == 0 and c%2 == 0:
    x = (b+c)//2
    y = (a+c)//2
    z = (a+b)//2
    a,b,c = x,y,z
    count+=1
    
print(count)

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

Solution (Python):
a,b,c = map(int,input().split())
count = 0
flag = True
while(a % 2 == 0 and b % 2 == 0 and c % 2 == 0):
    aa = a//2
    bb = b//2
    cc = c//2
    a = bb + cc
    b = aa + cc
    c = aa + bb
    if(a == b == c):
        flag = False
        break
    count += 1

if flag:
    print(count)
else:
    print(-1)

Solution (Python):
def myAnswer(A:int,B:int,C:int) ->int:
   if(A == B and B == C):
      if(A % 2 == 0):
         return -1
      else:
         return 0
   counter = 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))
      counter += 1
   return counter

def modelAnswer():
   tmp=1
def main():
   A,B,C = map(int,input().split())
   print(myAnswer(A,B,C))

if __name__ == '__main__':
   main()

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

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

Solution (Python):
l = list(map(int,input().split()))
ans = 0
if l[0] == l[1] == l[2] and all(i % 2 == 0 for i in l):
  print(-1)
  exit()
while all(i % 2 == 0 for i in l):
  a = l[0]//2; b = l[1]//2; c = l[2]//2;
  l[0] = b + c
  l[1] = a + c
  l[2] = a + b
  ans += 1
print(ans)

Solution (Python):
A, B, C = map(int, input().split())
flag = False
count = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    halfA = A // 2
    halfB = B // 2
    halfC = C // 2

    if A == (halfB + halfC) and B == (halfA + halfC) and C == (halfA + halfB):
        flag = True
        break
    else:
        A = halfB + halfC
        B = halfA + halfC
        C = halfA + halfB
        count += 1
if flag:
    print(-1)
else:
    print(count)

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

AA, BB, CC = A, B, C
cnt = 0
while True:
    if (A % 2) | (B % 2) | (C % 2):
        print(cnt)
        exit(0)
    a, b, c = A // 2, B // 2, C // 2
    A, B, C = b + c, a + c, a + b
    cnt += 1
    if (A == B) & (B == C):
        print(-1)
        exit(0)
    if (A == AA) & (B == BB) & (C == CC):
        print(-1)
        exit(0)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        L=list(map(int,input().split()))
        if L==[1,1,1]:
            return 0
        elif L[0]==L[1] and L[1]==L[2]:
            return -1
        S=sum(L)
        cnt=0
        while True:
            for i in range(3):
                if (S-L[i])%2==0:
                    L[i]=(S-L[i])//2
                else:
                    return cnt
            cnt+=1
    print(main())


resolve()

Solution (Python):
import heapq
from collections import defaultdict, deque
from math import ceil, factorial
from fractions import gcd
import sys

sys.setrecursionlimit(10 ** 7)
INF = float("inf")
MOD = 10 ** 9 + 7

si = lambda: input().strip()
ii = lambda: int(input())
mii = lambda: map(int, input().split())
lmii = lambda: list(map(int, input().split()))
smii = lambda: sorted(map(int, input().split()))


def func(a, b, c):
    if a % 2 or b % 2 or c % 2:
        return 0
    if a == b == c:
        return -1
    return func((b + c) // 2, (a + c) // 2, (b + c) // 2) + 1


A, B, C = mii()

print(func(A, B, C))

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

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

while 1:
	if A % 2 == 1:
		break
	if B % 2 == 1:
		break
	if C % 2 == 1:
		break
	a = B / 2 + C / 2
	b = A / 2 + C / 2
	c = A / 2 + B / 2
	ans += 1
	if a == A and b == B and C == c:
		ans = -1
		break
	else:
		A = a
		B = b
		C = c
print(ans)

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

ans = 0
for i in range(10000):
    if (a + 1) * (b + 1) * (c + 1) % 2 == 0:
        print(ans)
        break
    if a == b == c:
        print(-1)
        break
    ans += 1
    a, b, c = a // 2, b // 2, c // 2
    a, b, c = b + c, a + c, b + c

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:
  ans = 0
  while a%2==b%2==c%2==0:
    a,b,c = (b+c)//2,(c+a)//2,(a+b)//2
    ans += 1
  print(ans)

Solution (Python):
A = list(map(int, input().split()))
ans = 0
if A[0] == A[1] == A[2]:
  if A[0] % 2 == 0: ans = -1
  else: ans = 0
else:
  ans = 0
  ok = True
  a = b = c = 0
  while ok:
    if A[0] % 2 != 0 or A[1] % 2 != 0 or A[2] % 2 != 0:
      ok = False
    a = (A[1] + A[2]) / 2
    b = (A[0] + A[2]) / 2
    c = (A[0] + A[1]) / 2
    if ok: 
      A = [a, b, c]
      ans += 1
print(ans)

Solution (Python):
cnt=0
a,s,d=map(int,input().split())
if a==s==d:
    if a%2==0:print(-1)
    else:print(0)
    exit()
while a%2==s%2==d%2==0:
    a,s,d=(s+d)//2,(a+d)//2,(a+s)//2
    cnt+=1
print(cnt)

Solution (Python):
a,b,c=map(int,input().split())
ans=0
rem=[]
flag=True
while a%2== b%2== c%2==0 and flag:
    a,b,c=(b+c)/2,(a+c)/2,(a+b)/2
    ans+=1
    if (a,b,c) in rem:
        print ("-1")
        flag=False
        break
    rem.append((a,b,c))
if flag:
    print (ans)

Solution (Python):
x = list(map(int,input().split()))
point = 0
def count(x,point):
    if x[0]%2 == 1 or x[1]%2 == 1 or x[2]%2 == 1:
        return(point)
    else:
        point += 1
        x = [(x[0]+x[1])/2,(x[0]+x[2])/2, (x[1]+x[2])/2]
        return(count(x,point))

if x[0] == x[1] == x[2] and x[0]%2==0:
    print(-1)
else:
    print(count(x,point))

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)


a, b, c = map(int, input().split())
if a % 2 == 0 and a == b == c:
    print(-1)
else:
    ans = 0
    while True:
        if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
            break
        copy_a = a
        copy_b = b
        copy_c = c
        a = copy_b // 2 + copy_c // 2
        b = copy_a // 2 + copy_c // 2
        c = copy_a // 2 + copy_b // 2
        ans += 1
    print(ans)

Solution (Python):
a,b,c = map(int,input().split(' '))
ans = 0
if a % 2 == 0 and a == b and a == c:
    ans = -1
elif (a+1)*(b+1)*(c+1)%2 == 0:
    ans = 0
else:
    A = [a,b,c]
    A.sort()
    a1 = A[2]-A[1]
    a2 = A[1]-A[0]
    ans = 0
    while a1%2 == 0 and a2%2 == 0:
        ans += 1
        a1 /= 2
        a2 /= 2
print(ans)

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

Solution (Python):
import bisect,collections,copy,itertools,math,numpy,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())

A,B,C = LI()
ans = 0
if A%2 or B%2 or C%2:
    ans = 0
elif A==B==C:
    ans = -1
else:
    while 1:
        if A%2 or B%2 or C%2:
            break
        A,B,C = (B+C)//2,(A+C)//2,(A+B)//2
        ans += 1
print(ans)

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

cnt = 0
if(A==B==C and A%2 == 0):
    print("-1")
else:
    while(A%2 == 0 and B%2 == 0 and C%2 == 0):
        tmpA = A
        tmpB = B
        tmpC = C
        cnt += 1
        A = tmpB//2+tmpC//2    
        B = tmpA//2+tmpC//2
        C = tmpA//2+tmpB//2
    print(cnt)