defmodule Main do
  def main do
    [a, b] =
      IO.read(:line)
      |> String.trim
      |> String.split(" ")
    a = String.to_integer(a)
    b = String.to_integer(b)
    cond do
    a <= 5 -> 
    IO.puts(0) 
    a <= 12 ->
    IO.puts(div(b, 2))
    a >= 13 ->
    IO.puts(b)
    end
  end
end
