import std.stdio, std.string, std.conv, std.array, std.range, std.algorithm;

void main() {
    long a, b;
    readf("%d %d", &a, &b);

    if (a <= 5) {
        writeln(0);
    } else if (a <= 12) {
        writeln(b / 2);
    } else {
        writeln(b);
    }

}
