a = list(map(int, input().split()))

cnt = 0
while True:
    for i, ai in enumerate(a):
        if ai % 2 == 0:
            a[i] //= 2
        else:
            break
    else:
        cnt += 1
        continue
    break

print(cnt)
