program main
  implicit none
  integer :: a, b, c
  read (*, *) a, b
  if (a < 6) then
    c = 0
  else if (a <= 12) then
    c = b / 2
  else
    c = b
  end if
  write (*, "(i0)") c
end program main
