#include <bits/stdc++.h>
using namespace std;
int main() {
  long long m, sum = 0, ans = 0;
  long long n, k;
  cin >> n >> k >> m;
  vector<long long> a(k);
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a.begin(), a.end());
  for (long long i = 0; i <= n; i++) {
    long long cur = m, r = 0;
    cur -= i * sum;
    r += i * (k + 1);
    if (cur < 0) {
      break;
    }
    for (auto x : a) {
      int k = min(cur / x, n - i);
      cur -= k * x;
      r += k;
    }
    ans = max(ans, r);
  }
  cout << ans;
}
