import scala.math.{min,max}

object Main {
    def main(args: Array[String]) {
        var input = io.Source.stdin.getLines().mkString("\n");
        var ss = input.split('\n').toList;
        val xs = to_array_int(ss(0));
        val a = xs(0);
        val b = xs(1);
        if (a <= 5) {
            println(0);
        }
        else if (6 <= a && a <= 12) {
            println(b/2);
        }
        else {
            println(b);
        }
    }
    def to_array_int(s: String): Array[Int] = {
        return s.split(' ').map(_.toInt).toArray;
    }
}
