A, B = map(int, input().split())
if A <= 5:
    cost = 0
elif A <= 12:
    cost = B / 2
else:
    cost = B
print(int(cost)) A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B if A <= 5:
    cost = 0
elif A <= 12:
    cost = B / 2
else:
    cost = B A <= 5 A 5 cost = 0 cost 0 elif A <= 12:
    cost = B / 2 A <= 12 A 12 cost = B / 2 cost B / 2 B 2 cost = B cost B print(int(cost)) print int(cost) int cost cost = B / 2 B / 2 cost cost = 0 0 cost B = map(int, input().split()) map(int, input().split()) B cost = B B cost A, B = map(int, input().split()) map(int, input().split()) A
A, B = map(int, input().split())
if A <= 5:
    cost = 0
elif A <= 12:
    cost = B / 2
else:
    cost = B
print(int(cost))