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: wgt += B[i]; val += C[i] if wgt <= W: ans = max(ans, val + P[min(W - wgt, N)]) print(ans)