import std.stdio, std.array, std.conv, std.typecons, std.algorithm;

T diff(T)(const ref T a, const ref T b) { return a > b ? a - b : b - a; }

void main() {
    immutable i = readln.split.to!(ulong[]);
    immutable a = i[0], b = i[1];
    auto ans = a >= 13 ? b : (a >= 6 ? b/2 : 0);
    writeln(ans);
}
