fun main (args : Array<String>) {
	val (age1, money1) = readLine()!!.split(" ").map(String::toInt)
	var age2 : Int = age1.toInt()
	var money2 : Int = money1.toInt()
	return if (age2 >= 13) {
		println("${money2}")
	} else if ((age2 >= 6) && (age2 <= 12)) {
		println("${money2/2}")
	} else {
		println("0")
	}
}