#include <bits/stdc++.h>
const int maxn = 50;
using namespace std;
long long n, k, M;
int a[maxn + 5], b[maxn * maxn];
void ok() {
  long long ans = 0, cot = 0, tot = 0, cnt = 0, sum = 0;
  sort(a + 1, a + k + 1);
  for (int i = 1; i <= k; i++) cot += a[i];
  for (int i = 0; i <= n; i++) {
    tot = cot * i;
    if (tot > M) break;
    sum = tot, cnt = (k + 1) * i;
    for (int j = 1; j <= k; j++) {
      for (int r = i + 1; r <= n; r++) {
        sum += a[j];
        cnt++;
        if (sum > M) {
          cnt--, j = k + 1;
          break;
        }
      }
    }
    ans = max(ans, cnt);
  }
  printf("%I64d\n", ans);
}
int main() {
  while (~scanf("%I64d %I64d %I64d", &n, &k, &M)) {
    for (int i = 1; i <= k; i++) scanf("%d", &a[i]);
    ok();
  }
  return 0;
}
