let () =
  Scanf.scanf "%d %d %d" @@ fun n m x ->
  let c = Array.init m (fun _ ->
    Scanf.scanf " %d" (fun v -> if v < x then 1 else 0))
    |> Array.fold_left (+) 0
  in Printf.printf "%d\n" (min c (m-c))