defmodule Main do
  def main do
    [n, m, l] = IO.gets("") |> String.trim |> String.split
    n = String.to_integer(n)
    m = String.to_integer(m)
    l = String.to_integer(l)
   	a = IO.gets("") |> String.trim |> String.split
    b = Enum.map(a, fn x -> String.to_integer(x) end)
    IO.puts(min(Enum.filter(b, fn x -> x < l end) |> length, Enum.filter(b, fn x -> x > l and l < n end) |> length))
  end
end
