#include <bits/stdc++.h>
using namespace std;
void doRoutine() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
signed main() {
  int n, k, M;
  cin >> n >> k >> M;
  vector<int> t(k);
  for (int i = 0; i < k; ++i) {
    cin >> t[i];
  }
  sort(t.begin(), t.end());
  vector<int> cost(k + 1);
  for (int i = 0; i < k; ++i) {
    cost[i + 1] = cost[i] + t[i];
  }
  int ans = 0;
  for (int cnt_full = 0; cnt_full <= n; ++cnt_full) {
    if (cnt_full * cost.back() <= M) {
      int cur_m = M - cnt_full * cost.back();
      int cur_ans = cnt_full * (k + 1);
      int cnt_rest = n - cnt_full;
      int i = 0;
      while (i < k && cnt_rest * t[i] <= cur_m) {
        cur_ans += cnt_rest;
        cur_m -= cnt_rest * t[i];
        ++i;
      }
      if (i < k) {
        int val = t[i];
        cur_ans += cur_m / val;
      }
      ans = max(ans, cur_ans);
    }
  }
  cout << ans << endl;
  return 0;
}
