"use strict";
function main(input) {
    const args = input.split(" ");

    const A = parseInt(args[0]);
    const B = parseInt(args[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"));
