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 l, r = ref 0, ref 0
let _ =
  for i = 0 to m - 1 do if a_s.(i) < x then incr l else incr r done;
  min !l !r |> Printf.printf "%d\n"