program barricade
  implicit none
  integer :: n, a, b, t, m = 0, i
  read(*,*) n, a, b
  do i = 1, n
    read(*,*) t
    if (t < a .or. b <= t) m = m+1
  end do
  write(*,'(i0)') m
end program barricade