age, max_money = map(int, input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0") age, max_money = map(int, input().split()) age map(int, input().split()) map int input().split() ().split () input split max_money if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0") age>= 13 age 13 print(max_money) print max_money elif age>=6 and age<=12:
  print(max_money//2) age>=6 and age<=12 age>=6 age 6 age<=12 age 12 print(max_money//2) print max_money//2 max_money 2 elif age<=5:
  print("0") age<=5 age 5 print("0") print "0" age, max_money = map(int, input().split()) map(int, input().split()) age max_money = map(int, input().split()) map(int, input().split()) max_money
age, max_money = map(int, input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")