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())) t = [] for i,v in enumerate(A): t.append([v*(10**100),1,v]) for i,v in enumerate(B): t.append([C[i]*(10**100)//B[i],B[i],C[i]]) t.sort() #print(t) ans = 0 weight = 0 while t: tanka,omosa,value = t.pop() if weight + omosa <= W: weight += omosa ans += value print(ans)