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

yen = 0
if a<= 5:
  yen = 0
elif a<=12:
  yen = b/2
else:
  yen = b
print(int(yen)) a,b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b yen = 0 yen 0 if a<= 5:
  yen = 0
elif a<=12:
  yen = b/2
else:
  yen = b a<= 5 a 5 yen = 0 yen 0 elif a<=12:
  yen = b/2 a<=12 a 12 yen = b/2 yen b/2 b 2 yen = b yen b print(int(yen)) print int(yen) int yen a,b = map(int, input().split()) map(int, input().split()) a yen = 0 0 yen b = map(int, input().split()) map(int, input().split()) b yen = b b yen yen = b/2 b/2 yen yen = 0 0 yen
a,b = map(int, input().split())

yen = 0
if a<= 5:
  yen = 0
elif a<=12:
  yen = b/2
else:
  yen = b
print(int(yen))