open Batteries

let read_two () = Scanf.sscanf (read_line ()) "%d %d" (fun a b -> (a, b))

let read_three () =
  Scanf.sscanf (read_line ()) "%d %d %d" (fun a b c -> (a, b, c))

let read_four () =
  Scanf.sscanf (read_line ()) "%d %d %d" (fun a b c d -> (a, b, c, d))

let read_list () =
  read_line () |> String.split_on_char ' '
  |> List.map (fun s -> int_of_string s)

(* a**x *)
let pow a x =
  let rec aux acc = function 0 -> acc | n -> aux (acc * a) (n - 1) in
  aux 1 x

let rec pow2 n = if n mod 2 = 0 then 1 + pow2 (n / 2) else 0

let rec f (l, r) x = function
  | [] -> (l, r)
  | a :: rest -> if a < x then f (l + 1, r) x rest else f (l, r + 1) x rest

let () =
  let _, _, x = read_three () in
  let a = read_list () in
  let l, r = f (0, 0) x a in
  let ans = min l r in
  print_int ans;
  print_newline ()
