# 入力
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()))

# step2で行う処理のために前計算(Aを降順に並び替え累積和を取る。)
A.sort(reverse = True)
CA = [0]
for i in range(n):
    CA.append(CA[-1] + A[i])

# step1. タイプBの荷物の選び方を全探索する。(bit全探索) 
ans = 0
for i in range(1<<m):
    # 選んだ荷物の総重量cと総価値v
    c = 0
    v = 0
    for j in range(m):
        # 選ぶ
        if(i >> j & 1):
            c += B[j]
            v += C[j]

    # タイプBのだけで総重量を超えたらパスする
    if(c > w): continue
    # step2. ナップザックの残りの容量でタイプAの荷物を詰めれるだけ詰める
    v += CA[min(w-c,  n)]
    # 答えの更新
    ans = max(ans,v)

# 出力
print(ans)