#include<stdio.h>
int main()
{
  int A, B, c=0;
  scanf("%d%d",&A,&B);
  if(A>=13)
  {
  printf("%d\n",B);
  }
  else if(A>=6 && A<=12)
  {
  printf("%d\n",B/2);
  }
  else
  {
  printf("%d\n",c);
  }
  return 0;
}