#include <bits/stdc++.h>
const int Inf = 1e9;
long long LINF = (long long)4e18;
using namespace std;
long long mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  long long n, k, M;
  cin >> n >> k >> M;
  vector<long long> t(k);
  long long sum = 0;
  for (int(i) = 0; (i) < k; (i)++) {
    cin >> t[i];
    sum += t[i];
  }
  sort((t).begin(), (t).end());
  long long ans = 0;
  for (int(i) = 0; (i) < n + 1; (i)++) {
    long long cur_ans = 0;
    long long tt = i * sum;
    long long tmp = M;
    if (tt > M)
      break;
    else {
      cur_ans += i * (k + 1);
      tmp -= tt;
      for (int(j) = 0; (j) < k; (j)++) {
        if ((n - i) * t[j] <= tmp) {
          cur_ans += n - i;
          tmp -= (n - i) * t[j];
        } else {
          cur_ans += tmp / t[j];
          break;
        }
      }
    }
    ans = max(ans, cur_ans);
  }
  cout << ans;
  return 0;
}
