function Main(input) {
	tmp = input.split(" ");
	var a = parseInt(tmp[0]);
	var b = parseInt(tmp[1]);
	var r = "";
	if(a<=5){ r = 0; }
	if(a>=6 && a<= 12){ r = b/2; }
	if(a>=13){ r = b; }
	console.log(r);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));