// Learn more about F# at http://fsharp.org
// See the 'F# Tutorial' project for more help.
open System

[<EntryPoint>]
let main argv =

    let inputs = stdin.ReadLine().Split(' ') |> Array.map int

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

    if age >= 13 then
        printfn "%d" fee
    elif age >= 6 && age <= 12 then
        printfn "%d" (fee/2)
    else
        printfn "0"

    0 // return an integer exit code
