from itertools import accumulate 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) acc = [0] + list(accumulate(a)) ans = -1 for i in range(1 << m): weight = 0 value = 0 for j in range(m): if i >> j & 1: weight += b[j] value += c[j] if weight > w: continue ans = max(ans, value + acc[min(n, w - weight)]) print(ans)