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 c = Array.fold_left (fun c a -> if a < x then c + 1 else c) 0 a_s
let _ = Printf.printf "%d\n" @@ min c @@ m - c