import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] first = br.readLine().split(" ", 3); int n = Integer.parseInt(first[0]); int m = Integer.parseInt(first[1]); int k = Integer.parseInt(first[2]); int[] prices = new int[n + 2]; for (int i = 1; i <= n + 1; i++) { prices[i] = Integer.parseInt(br.readLine()); } long[][] buyDp = new long[m + 1][n + 2]; long[][] sellDp = new long[m + 1][n + 2]; long[][] restDp = new long[m + 1][n + 2]; Arrays.fill(sellDp[0], k); for (int i = 1; i <= m; i++) { for (int j = 1; j <= n + 1; j++) { long buy = sellDp[i - 1][j - 1] / prices[j]; long rest = sellDp[i - 1][j - 1] % prices[j]; if (buy == buyDp[i - 1][j]) { rest = Math.max(rest, restDp[i - 1][j]); } else if (buy < buyDp[i - 1][j]) { buy = buyDp[i - 1][j]; rest = restDp[i - 1][j]; } if (buy == buyDp[i][j - 1]) { rest = Math.max(rest, restDp[i][j - 1]); } else if (buy < buyDp[i][j - 1]) { buy = buyDp[i][j - 1]; rest = restDp[i][j - 1]; } buyDp[i][j] = buy; restDp[i][j] = rest; } for (int j = 1; j <= n + 1; j++) { sellDp[i][j] = Math.max(Math.max(sellDp[i - 1][j], sellDp[i][j - 1]), Math.max(sellDp[i][j], buyDp[i][j - 1] * prices[j] + restDp[i][j - 1])); } } System.out.println(sellDp[m][n + 1]); } }