#include <iostream>
using namespace std;
int main() {
int A,B;
cin>>A>>B ;
if(B%2==0)
{
if (A>=13){
  cout<<(B)<<endl;
 
  }
else if (A>=6 && A<=12)
     {
    cout<<(0.5*B)<<endl;
    
   }
    else
      {	
      cout<<B*0 <<endl;
    }
}
  return 0;
 }