#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie();
  long n, m, k;
  cin >> n >> k >> m;
  vector<long> t(k, 0);
  long sum = 0;
  for (int i = 0; i < k; ++i) {
    cin >> t[i];
    sum += t[i];
  }
  sort(t.begin(), t.end());
  long res = 0;
  for (int i = 0; i <= n; ++i) {
    long m1 = m - (sum * i);
    if (m1 < 0) break;
    long n1 = n - i;
    long parts_solved = i * (k + 1);
    ;
    for (int j = 0; j <= k; ++j) {
      long tmp = t[j] * n1;
      if (m1 - tmp > 0) {
        parts_solved += n1;
        m1 -= tmp;
      } else {
        long count_tmp = m1 / t[j];
        parts_solved += count_tmp;
        m1 -= count_tmp * t[j];
        break;
      }
    }
    if (parts_solved > res) res = parts_solved;
  }
  cout << res;
  return 0;
}
