import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] sa = br.readLine().split(" "); int n = Integer.parseInt(sa[0]); int m = Integer.parseInt(sa[1]); long w = Long.parseLong(sa[2]); sa = br.readLine().split(" "); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = Integer.parseInt(sa[i]); } sa = br.readLine().split(" "); int[] b = new int[m]; for (int i = 0; i < m; i++) { b[i] = Integer.parseInt(sa[i]); } sa = br.readLine().split(" "); int[] c = new int[m]; for (int i = 0; i < m; i++) { c[i] = Integer.parseInt(sa[i]); } br.close(); Arrays.sort(a); reverse(a); long[] a2 = new long[n + 1]; for (int i = 0; i < n; i++) { a2[i + 1] = a2[i] + a[i]; } long ans = 0; int end = 1 << m; for (int i = 0; i < end; i++) { long wei = 0; long val = 0; for (int j = 0; j < m; j++) { if ((i >> j & 1) == 1) { wei += b[j]; val += c[j]; } } if (wei <= w) { int rem = (int) Math.min(n, w - wei); val += a2[rem]; ans = Math.max(ans, val); } } System.out.println(ans); } static void reverse(int[] a) { for (int i = 0; i < a.length / 2; i++) { int tmp = a[i]; a[i] = a[a.length - 1 - i]; a[a.length - 1 - i] = tmp; } } }