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 = [0] * (n + 1) for i in range(n): cum[i + 1] = cum[i] + A[i] ans = 0 for bit in range(1 << m): w = 0 v = 0 for i in range(m): if bit >> i & 1: w += B[i] v += C[i] if w <= W: v += cum[min(n, W - w)] ans = max(ans, v) print(ans)