func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

let ab = readIntSplit(by: " ")
var (a, b, ans) = (ab[0], ab[1], 0)
if 5 < a && a <= 12 {
    ans = b/2
} else if 12 < a {
    ans = b
}
print(ans)
