N = gets.to_i
A,B = gets.split(" ").map(&:to_i)
P = gets.split(" ").map(&:to_i)

psort = P.sort

cnt_1 = 0
cnt_2 = 0
psort.each do |key,val|
  if val <= A
    cnt_1 += 1
  end
  if val <= B
    cnt_2 += 1
  end
end
if A < psort.min 
  puts 0
end
if (cnt_2 / 2) <= cnt_1
  puts cnt_1
else
  puts 0
end
