#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k, M, sum = 0;
  cin >> n >> k >> M;
  vector<long long> t(k);
  for (long long i = 0; i < k; i++) {
    cin >> t[i];
    sum += t[i];
  }
  sort(t.begin(), t.end());
  long long z = min(M / sum, n) + 1, q = 0;
  for (long long i = 0; i < z; i++) {
    long long n1 = n - i, m1 = M - sum * i, ans = 0;
    for (long long j = 0; j < k; j++) {
      ans += min(m1 / t[j], n1);
      m1 -= min(m1 / t[j], n1) * t[j];
    }
    q = max(q, ans + i + k * i);
  }
  cout << q;
}
