import sys sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) mod=10**9+7 def main(): N,X,Y,Z=MI() A=LI() L=[0]*N XX=0 YY=0 ZZ=0 for i in range(N): L[i]=(A[i]+1000)//1000 XX+=L[i] L.sort(reverse=True) for i in range(N): if L[i]>=10 and ZZ=5 and YY