#include <bits/stdc++.h>
using namespace std;
vector<int> a;
int solve(int n, int k, int m) {
  int i, ans = 0;
  for (i = 1; i <= k; i++) {
    if (m >= n * a[i]) {
      m -= n * a[i];
      ans += n;
    } else {
      ans += m / a[i];
      break;
    }
  }
  return ans;
}
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  int i, j, t;
  int s = 0;
  a.push_back(0);
  for (i = 0; i < k; i++) {
    cin >> t;
    s += t;
    a.push_back(t);
  }
  sort(a.begin(), a.end());
  int ans = solve(n, k, m);
  for (i = 1; i <= n; i++) {
    if (s * i <= m) {
      ans = max(ans, solve(n - i, k, m - s * i) + i * (k + 1));
    }
  }
  cout << ans;
  return 0;
}
