#include <bits/stdc++.h>
using namespace std;
long long k;
long long find_vertical_score(long long max_time, long long a[],
                              long long rem_time) {
  long long score = 0;
  for (int i = 0; i < k; i++) {
    if (rem_time >= (a[i] * max_time)) {
      rem_time -= (a[i] * max_time);
      score += (max_time);
    } else {
      score += (rem_time / a[i]);
      break;
    }
  }
  return score;
}
int main() {
  long long n, m;
  cin >> n >> k >> m;
  long long a[k];
  for (int i = 0; i < k; i++) cin >> a[i];
  sort(a, a + k);
  long long onetask = 0, local_score, max_score = -1, maxtask;
  for (int i = 0; i < k; i++) onetask += a[i];
  maxtask = m / onetask;
  for (int i = 0; (i <= maxtask && i <= n); i++) {
    local_score = (i * (k + 1));
    local_score += find_vertical_score((n - i), a, m - (onetask * i));
    if (local_score > max_score) max_score = local_score;
  }
  cout << max_score << endl;
  return 0;
}
