'use strict'
const Main = (input) => {
  let tmp = input.split('\n');
  let Age = tmp[0].split(' ').map(Number)[0];
  let Cost = tmp[0].split(' ').map(Number)[1];

  if (6 <= Age && Age <= 12) {
    Cost = Cost / 2;
  } else if (Age <= 5) {
    Cost = 0;
  }
  console.log(Cost);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
