#include <iostream>
#include<string>
using namespace std;

int main()
{   int a, b;
    cin>>a>>b;
    if(a>=13){
    cout<<b<<endl;
   } else if (a<13&&a>=6){
      cout<<(b/2)<<endl;
    }else{
    cout<<b*0<<endl;
    }


    return 0;
}