import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.List; import java.util.AbstractCollection; import java.util.PriorityQueue; import java.util.Scanner; import java.util.Comparator; import java.util.ArrayList; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); No664 solver = new No664(); solver.solve(1, in, out); out.close(); } static class No664 { public void solve(int testNumber, Scanner in, PrintWriter out) { int N = in.nextInt() + 1; int M = in.nextInt(); long K = in.nextInt(); int[] A = new int[N]; for (int i = 0; i < N; i++) { A[i] = in.nextInt(); } PriorityQueue pq = new PriorityQueue<>(new Comparator() { public int compare(State o1, State o2) { return o2.diff - o1.diff; } }); for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { pq.add(new State(i, j, A[j] - A[i])); } } FenwickTree fw = new FenwickTree(N); List ans = new ArrayList<>(); for (int i = 0; i < N && !pq.isEmpty(); i++) { State st = pq.poll(); if (st.diff < 0) break; if (fw.get(st.left, st.right + 1) > 0) { i--; continue; } else { for (int j = st.left; j <= st.right; j++) { fw.add(j, 1); } ans.add(st); } } ans.sort(new Comparator() { public int compare(State o1, State o2) { return o1.left - o2.right; } }); for (State st : ans) { long foo = K / A[st.left]; K -= foo * A[st.left]; K += foo * A[st.right]; } out.println(K); } public class State { public int left; public int right; public int diff; public State(int l, int r, int diff) { this.left = l; this.right = r; this.diff = diff; } } } static class FenwickTree { private long[] bit; public FenwickTree(int n) { this.bit = new long[n]; } public void add(int idx, long val) { for (int i = idx; i < this.bit.length; i |= i + 1) { this.bit[i] += val; } } public long get(int r) { long ret = 0; for (int i = r - 1; i >= 0; i = (i & (i + 1)) - 1) { ret += this.bit[i]; } return ret; } public long get(int l, int r) { return this.get(r) - this.get(l - 1); } } }