open System

[<EntryPoint>]
let main argv = 
    
    let inputs = stdin.ReadLine().Split(' ') |> Array.map int

    let age = inputs.[0]
    let fee = inputs.[1]

    match age with
    | age when age >= 13             -> printfn "%d" fee
    | age when age >= 6 && age <= 12 -> printfn "%d" (fee/2)
    | _                              -> printfn "%d" 0

    0 // return an integer exit code
