#include <bits/stdc++.h>
using namespace std;
const int INF32 = 0x3f3f3f3f;
const long long INF64 = 0x3f3f3f3f3f3f3f3f;
const int mod2 = 1e9 + 9;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, m;
  long long sum = 0;
  cin >> n >> k >> m;
  vector<int> cost(k + 1);
  for (int i = 1; i <= k; ++i) {
    cin >> cost[i];
    sum += cost[i];
  }
  sort(cost.begin(), cost.end());
  int ans = 0, temp, t, tm = m;
  for (int i = 0; i <= n && sum * i <= tm; ++i) {
    temp = (k + 1) * i;
    tm -= sum * i;
    for (int j = 1; j <= k && tm >= cost[j]; ++j) {
      t = min(tm / cost[j], n - i);
      temp += t;
      if (j == k) temp += t;
      tm -= t * cost[j];
    }
    tm = m;
    ans = max(ans, temp);
  }
  cout << ans << '\n';
  return 0;
}
