N,M,W = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
A.append(0)
A = A[::-1]
for i in range(N):
  A[i+1] += A[i]

ans = A[min(N,W)]

for bit in range(1 << M):
  w,v = 0,0
  for j in range(M):
    if (bit >> j) & 1:
      w += B[j]
      v += C[j]
  if w > W:
    continue
  ans = max(ans,v + A[min(N,W-w)])
print(ans)