while(lines=readline()){
	let [age,cost]=lines.split(' ');
	age=parseInt(age);
    cost=parseInt(cost);
	if(age<13){
    	if(age>5){
        	cost=cost/2;
        }else{
			cost=0;
        }
    }
    print(cost)
}