m,n = map(int,input().split())
t = [int(x) for x in input().split()]
v = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

t.append(0)
v.append(0)

d = [1] * (m+1)
cv = [0] * n
x = [m] * n

c.sort()

for j in range(0,n):
    for i in range(0,m):
        if t[i]<c[j] and v[i]>cv[j] and d[i]==1:
            d[x[j]]=1
            cv[j]=v[i]
            d[i]=0
            x[j]=i
print(sum(cv))