function Main(input) {

	input = input.split(" ");
	
	var ages = parseInt(input[0]);
	var price = parseInt(input[1]);
	
	var show = 0;
	
	if(ages >= 13){
	    show = price;
	}else if(ages <= 12 && age >= 6){
	    show = price/2;
	}else{
	    show = 0;
	}
	
    console.log(show);

}

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