const Main = input => {
    input = input[0].split(' ')
    var A = parseInt(input[0], 10);
    var B = parseInt(input[1], 10);
    if (A >= 13) {
        console.log(B);
    } else if (A >= 6) {
        console.log(B/2);
    } else {
        console.log(0);
    }
};
Main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));