function Main(input) {
    input = input.trim().split(" ");
    var A = parseInt(input[0],10);
    var B = parseInt(input[1],10);
    var output;

    if(A <= 5){
        output = 0;
    }
    else if(A <= 12){
        output = B/2;
    }
    else{
        output = B;
    }
    console.log(output);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));