function main(input) {
  const inArray = input.trim().split(' ').map(x => parseInt(x));
  console.log( inArray[0] >= 13 ? inArray[1] : inArray[0] >= 6 ? inArray[1] / 2 : 0);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
