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

if a >= 13:

  print(b)

elif a <= 5:

  print((0))

else:

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

if a <= 5:

    print((0))

elif a <= 12:

    print((b//2))

else:

    print(b)

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

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

-if a >= 13: +if a <= 5: +    print((0)) +elif a <= 12: +    print((b // 2)) +else: -elif a <= 5: -    print((0)) -else: -    print((b // 2))