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