from bisect import bisect_left N, M, W = map(int, input().split()) A = sorted(list(map(int, input().split())), reverse=True) B = list(map(int, input().split())) C = list(map(int, input().split())) s = [0] for i in A: s.append(s[-1]+i) ans = 0 for i in range(2**M): w = v = 0 for j in range(M): if (i >> j) & 1: w += B[j] v += C[j] if W < w: continue v += s[min(W-w, N)] ans = max(ans, v) print(ans)