a, b = [int(x) for x in input().split()]
print(
  0 if a <= 5 else
  b // 2 if a <= 12 else
  b
) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a, b = [int(x) for x in input().split()] a [int(x) for x in input().split()] b print(
  0 if a <= 5 else
  b // 2 if a <= 12 else
  b
) print 0 if a <= 5 else
  b // 2 if a <= 12 else
  b a <= 5 a 5 0 b // 2 if a <= 12 else
  b a <= 12 a 12 b // 2 b 2 b a, b = [int(x) for x in input().split()] [int(x) for x in input().split()] a b = [int(x) for x in input().split()] [int(x) for x in input().split()] b
a, b = [int(x) for x in input().split()]
print(
  0 if a <= 5 else
  b // 2 if a <= 12 else
  b
)
