#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } int main() { int N; int M; int K; while (~scanf("%d%d%d", &N, &M, &K)) { ++ N; vector A(N); for (int i = 0; i < N; ++ i) scanf("%d", &A[i]); vector> dp(N + 1, vector(M + 1, -1)); dp[0][0] = K; rep(i, N) { rep(j, M + 1) amax(dp[i + 1][j], dp[i][j]); rep(j, M) { ll x = dp[i][j]; if (x == -1) continue; ll p = x / A[i]; rer(k, i + 2, N) amax(dp[k][j + 1], x + p * (A[k - 1] - A[i])); } } ll ans = *max_element(dp.back().begin(), dp.back().end()); printf("%lld\n", ans); } return 0; }