'use strict';

function main(stdin) {
  const input = stdin.split(' ').map(v => parseInt(v, 10));
  const A = input[0];
  const B = input[1];
  let ans;

  if (A < 6) {
    ans = 0;
  } else if (A <= 12) {
    ans = B / 2;
  } else {
    ans = B;
  }
  
  console.log(ans);
}

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