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