let n, m, x = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let a_s = Array.init m @@ fun _ -> Scanf.scanf " %d" @@ (+) 0
let ans = Array.make 2 0
let _ =
  for i = 0 to m - 1 do
    if a_s.(i) < x then ans.(0) <- ans.(0) + 1
    else ans.(1) <- ans.(1) + 1 done;
  min ans.(0) ans.(1) |> Printf.printf "%d\n"