function Main(input) {
  input = input.split(' ');
  var age = input[0];
  var few = input[1];
  if(age < 6){
   console.log(0);
  }else if (age > 12 ) {
   console.log(few);
  } else {
   console.log(few / 2);
  }
  
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
