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) cum_sum = [0] * (N + 1) for i in range(N): cum_sum[i + 1] = cum_sum[i] + A[i] ans = 0 for i in range(1 << M): w = v = 0 for j in range(M): if i >> j & 1: w += B[j] v += C[j] if w > W: continue ans = max(ans, v + cum_sum[min(N, W - w)]) print(ans)