open System

let calc (a: int) (b: int): int =
    if a <= 5 then
        0
    else if a <= 12 then
        b / 2
    else
        b

[<EntryPoint>]
let main _ =
    let input = Console.ReadLine()
    let [| a; b |] = input.Split(' ') |> Array.map Int32.Parse
    printfn "%d" <| calc a b
    0
