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

if a >= 13:
  cost = b
if a >= 6 and a <= 12:
  cost = int(b / 2)
  
print(cost) a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b cost = 0 cost 0 if a >= 13:
  cost = b a >= 13 a 13 cost = b cost b if a >= 6 and a <= 12:
  cost = int(b / 2)
   a >= 6 and a <= 12 a >= 6 a 6 a <= 12 a 12 cost = int(b / 2) cost int(b / 2) int b / 2 b 2 print(cost) print cost a,b = map(int,input().split()) map(int,input().split()) a cost = 0 0 cost cost = int(b / 2) int(b / 2) cost b = map(int,input().split()) map(int,input().split()) b cost = b b cost
a,b = map(int,input().split())
cost = 0

if a >= 13:
  cost = b
if a >= 6 and a <= 12:
  cost = int(b / 2)
  
print(cost)