"use strict"
function main(arg) {
    var t = arg.trim().split("\n")[0].split(" ").map(Number)
    var a = t[0]
    var b = t[1]
    if (a <= 5) {
        console.log(0)
    } else if (a < 13) {
        console.log(b / 2)
    } else {
        console.log(b)
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));