import numpy;n,a,b,*p=list(map(int,open(0).read().split()));c=numpy.array(p);d,f=sum(c<=a),sum(b<c);print((min(d,n-d-f,f)))
n,a,b,*p=list(map(int,open(0).read().split()));c=[0]*3

for t in p:c[(t<=a)-(t>b)]+=1

print((min(c)))
import numpy

n, a, b, *p = list(map(int, open(0).read().split()))
c = numpy.array(p)
d, f = sum(c <= a), sum(b < c)
print((min(d, n - d - f, f)))

n, a, b, *p = list(map(int, open(0).read().split()))
c = [0] * 3
for t in p:
    c[(t <= a) - (t > b)] += 1
print((min(c)))

-import numpy - -c = numpy.array(p) -d, f = sum(c <= a), sum(b < c) -print((min(d, n - d - f, f))) +c = [0] * 3 +for t in p: +    c[(t <= a) - (t > b)] += 1 +print((min(c)))