let () = Scanf.scanf "%d %d %d\n" @@ fun n m x ->
  let as_ = Array.to_list @@ Array.init m @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  Printf.printf "%d\n" @@ min
    (List.length @@ List.filter (( <= ) x) as_)
    (List.length @@ List.filter (( >= ) x) as_)

