program Ferriswheel
 implicit none
 integer A, B, D, E
 read(*,*) A, B
 D = B/2
 E = 0
  if (A.le.5) then
  write(*,*) E
  else if (A.le.12) then
  write(*,*) D
  else if (A.ge.13) then
  write(*,*) B
  end if
end program