function main(input) {
  const nums = input.split(" ")
  const age = parseInt(nums[0], 10)
  const B = parseInt(nums[1], 10)
  
  if (age >= 13) { return B }
  if (6 <= age <= 12) { return B / 2 }
  if (age <= 5) { return 0 }
  
}
 
console.log(main(require("fs").readFileSync("/dev/stdin", "utf8")))