function main(input){
  input = input.split("\n");
  var a = parseInt(input[0].split(" ")[0]);
  var b = parseInt(input[0].split(" ")[1]);

  if (a > 12) {
    console.log(b);
  } else if (a <= 12 && a >= 6) {
    console.log(b/2);
  }else {
    console.log(0);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));