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) A_ac = [0] for i in A: A_ac.append(A_ac[-1] + i) ans = 0 for b in range(1 << M): B_sum = sum(B[i] for i in range(M) if b & (1 << i)) C_sum = sum(C[i] for i in range(M) if b & (1 << i)) if B_sum <= W: ans = max(ans, A_ac[min(N, W - B_sum)] + C_sum) print(ans)