#include <bits/stdc++.h>
using namespace std;
int static_init = []() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout << fixed;
  return 0;
}();
constexpr int K = 45;
int32_t n, k, m, t[K], s, ans;
int main() {
  cin >> n >> k >> m;
  for (int i = 0; i < k; i++) cin >> t[i], s += t[i];
  sort(t, t + k);
  for (int j = 0; j <= n; j++) {
    if (j * s > m) break;
    int mm = m - j * s, ans2 = j * (k + 1);
    for (int i = 0; i < k; i++) {
      int x = min(n - j, mm / t[i]);
      ans2 += x;
      mm -= x * t[i];
    }
    ans = max(ans, ans2);
  }
  cout << ans << endl;
  return 0;
}
