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() A.append(0) A.reverse() for i in range(len(A)-1): A[i+1] += A[i] ans = 0 for bit in range(2**M): nw = 0 nc = 0 for i in range(M): if (1<= 0: nc += A[min(remw , len(A)-1)] ans = max(ans , nc) print (ans)