a, b = map(int, input().split())
if a >= 13:
    x = b
elif a >= 6:
    x = b / 2
else:
    x = 0
print(int(x)) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b if a >= 13:
    x = b
elif a >= 6:
    x = b / 2
else:
    x = 0 a >= 13 a 13 x = b x b elif a >= 6:
    x = b / 2 a >= 6 a 6 x = b / 2 x b / 2 b 2 x = 0 x 0 print(int(x)) print int(x) int x a, b = map(int, input().split()) map(int, input().split()) a x = b b x x = 0 0 x b = map(int, input().split()) map(int, input().split()) b x = b / 2 b / 2 x
a, b = map(int, input().split())
if a >= 13:
    x = b
elif a >= 6:
    x = b / 2
else:
    x = 0
print(int(x))