function main(input) {
  var str = input.split(" ");
  var fee;

  if(13 <= str[0]){
    fee = str[1];
  }else if(6 <= str[0] && str[0] < 13){
    fee = str[1]/2;
  }else{ 
    fee = 0;
  }

  console.log(fee);
}

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