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

if i[0]>=13:

  print((i[1]))

elif 6<=i[0]<=12:

  print((int(i[1]/2)))

else :

  print((0))



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

print((b if a>12 else int(b/2) if 5<a and a<13 else 0))
i = list(map(int, input().split()))
if i[0] >= 13:
    print((i[1]))
elif 6 <= i[0] <= 12:
    print((int(i[1] / 2)))
else:
    print((0))

a, b = list(map(int, input().split()))
print((b if a > 12 else int(b / 2) if 5 < a and a < 13 else 0))

-i = list(map(int, input().split())) -if i[0] >= 13: -    print((i[1])) -elif 6 <= i[0] <= 12: -    print((int(i[1] / 2))) -else: -    print((0)) +a, b = list(map(int, input().split())) +print((b if a > 12 else int(b / 2) if 5 < a and a < 13 else 0))