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