"use strict";
function Main(input) {
  const args = input.split(' ').map(m => parseInt(m));
  const A = args.shift();
  const B = args.shift();
  let price = B;
  if (A <= 5) {
   price = 0;
  } else if (A <= 12) {
   price /= 2;
  }

  console.log(price);

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));