using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;

namespace atcoder
{

    namespace atcoder
    {
        class Program
        {
            static void Main(string[] args)
            {
                string[] input = Console.ReadLine().Split(' ');
                int A = int.Parse(input[0]);
                int B = int.Parse(input[1]);
                int ans = B / 2;
                if (A <= 5){
                  Console.WriteLine(0);
                }else if (6 <= A && A <= 12)
                {   
                    Console.WriteLine(ans);
                }else{
                    Console.WriteLine(B);
                }
            }
        }
    }
}