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(reverse=True) P = [0]*(N+1) for i, a in enumerate(A): P[i+1] = P[i] + a ans = 0 for S in range(1<>i&1) if wgt > W: continue val = sum(c for i, c in enumerate(C) if S>>i&1) ans = max(ans, val + P[min(W - wgt, N)]) print(ans)