function Main(input) {
  input = input.trim()
  input = input.split(" ").map(Number);
  if(input[0]<5) console.log(0)
  else if(input[0]<12) console.log(input[1]/2)
  else console.log(input[1])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
