def main():
  num = list(map(int,input().split()))
  if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2))

main() def main():
  num = list(map(int,input().split()))
  if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2)) main num = list(map(int,input().split())) num list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2)) num[0]<=5 num[0] num 0 5 print(0) print 0 elif num[0]>=13:
    print(num[1])
   num[0]>=13 num[0] num 0 13 print(num[1]) print num[1] num 1 print(int(num[1]/2)) print int(num[1]/2) int num[1]/2 num[1] num 1 2 main() main def main():
  num = list(map(int,input().split()))
  if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2)) def main():
  num = list(map(int,input().split()))
  if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2)) main
def main():
  num = list(map(int,input().split()))
  if num[0]<=5:
    print(0)
  elif num[0]>=13:
    print(num[1])
  else :
    print(int(num[1]/2))

main()