import Foundation
 
let input_line = readLine()!
 
let split = input_line.componentsSeparatedByString(" ") //components(separatedBy:)と実質同じ
let age = Int(split[0])!
let price = Int(split[1])!
var returnPrice = 0

if age > 12 {
	returnPrice = price  
} else if 6 <= age && age <= 12 {
  	returnPrice = price / 2
}
 
print(returnPrice)