#include <bits/stdc++.h>
using namespace std;
const int N = 50;
long long sum[N], n, k;
long long cumm[N];
int main() {
  int m;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= k; i++) scanf("%I64d", &sum[i]), cumm[i] = sum[i];
  sort(sum, sum + k + 1);
  for (int i = 1; i <= k; i++) cumm[i] += cumm[i - 1];
  int ans = 0;
  for (int i = 0; i <= n; i++) {
    long long currTime = i * cumm[k];
    if (currTime > m) break;
    int leftTime = m - currTime;
    int currScore = i * (k + 1);
    int curr = 1;
    while (curr <= k && leftTime > 0) {
      if ((n - i) * sum[curr] <= leftTime) {
        leftTime -= (n - i) * sum[curr];
        currScore += n - i;
        curr++;
      } else {
        break;
      }
    }
    while (curr <= k && leftTime >= sum[curr])
      currScore++, leftTime -= sum[curr];
    ans = max(currScore, ans);
  }
  printf("%d", ans);
  return 0;
}
