#include <iostream>

using namespace std;

int main()
{
    int age;
    int cost;
    cin>>age;
    cin>>cost;


    if (age > 12)
    {
        cost=cost;
        cout<<cost;
    }

    else if (5 < age && age < 13)
    {
        cost=cost/2;
        cout<<cost;
    }
    else if (age<6)
    {
        cost=0;
        cout<<cost;
    }

    return 0;
}
