#include <bits/stdc++.h>
using namespace std;
const int N = 108;
long long n, m, w, a[N], b[N];
long long maxx(long long x, long long y) {
  if (x > y) y = x;
  return y;
}
int main(void) {
  long long i, j, k, ans, s;
  scanf("%I64d%I64d%I64d", &n, &m, &w);
  for (i = 1; i <= m; i++) scanf("%I64d", a + i);
  sort(a + 1, a + 1 + m);
  for (i = 1; i <= m; i++) b[i] = b[i - 1] + a[i];
  ans = 0;
  for (i = 0; i <= n && b[m] * i <= w; i++) {
    s = i * (m + 1);
    k = w - b[m] * i;
    for (j = 1; j <= m; j++)
      if ((n - i) * a[j] <= k) {
        s += n - i;
        k -= (n - i) * a[j];
      } else {
        s += k / a[j];
        break;
      }
    ans = maxx(ans, s);
  }
  cout << ans;
  return 0;
}
