function main(input) {
  var a = input.split(" ")[0]-0, b = input.split(" ")[1]-0;
  if(a<=5){
    console.log(0);
  }else if(a<=12){
    console.log(b/2);
  }else{
    console.log(b);
  }
}

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