#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e8;
const long long N = 2e6 + 5;
const long long inf = 1e14;
long long g(long long m, long long t[], long long k, long long n) {
  long long x = 0;
  for (long long i = 0; i < k; i++) {
    if (n * t[i] <= m) {
      x += n;
      m -= n * t[i];
    } else {
      x += m / t[i];
      break;
    }
  }
  return x;
}
void solve() {
  long long n, k, m;
  cin >> n >> k >> m;
  long long t[k];
  for (long long i = 0; i < k; i++) cin >> t[i];
  sort(t, t + k);
  long long sum = 0;
  for (long long i = 0; i < k; i++) sum += t[i];
  long long ans = -1;
  for (long long l = 0; l <= n; l++) {
    long long rem = m - l * sum;
    if (rem < 0) break;
    ans = max(ans, l * (k + 1) + g(rem, t, k, n - l));
  }
  cout << ans << endl;
}
int32_t main() {
  long long t = 1;
  while (t--) solve();
}
