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