let n, a, b = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let ps = Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let cs = Array.make 3 0
let f i = cs.(i) <- cs.(i) + 1
let _ = Array.iter (fun p -> if p <= a then f 0 else if p <= b then f 1 else f 2) ps;
  Array.fold_left min 100 cs |> Printf.printf "%d\n"