const Main = (input) => {
	var xs = input.trim().split(' ').map(v=>parseInt(v,10));
    if(xs[0]>=13){
    console.log(xs[1]);
    }else if(xs[0] <=12 && xs[0]>=6){
    console.log(xs[1]/2);
    }else{
    console.log(0)  
    }
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));