'use strict'
function Main(input) {
    input = input.split(' ');
    let age = parseInt(input[0], 10);
    let value = parseInt(input[1], 10);	
  	let price = 0;
	if(age > 5 && age < 13){
    	price = value/2
    }else if(age >= 13){
    	price = value
    }
    console.log('%d',price);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
