#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const long long inf = 1000000000000;
int main() {
  int n, k;
  long long m;
  cin >> n >> k >> m;
  vector<long long> v;
  long long s = 0;
  for (int i = 0; i < k; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    s += v[i];
  }
  long long mx = 0;
  int i = 0;
  long long tm = m;
  int cnt = n;
  while (true) {
    if (cnt == 0) {
      i++;
      cnt = n;
    }
    if (i == v.size()) {
      break;
    }
    if (tm / v[i] == 0) {
      break;
    }
    int k1 = min(tm / v[i], (long long)cnt);
    mx += k1;
    tm -= k1 * v[i];
    cnt -= k1;
  }
  for (int i = 1; i <= n; i++) {
    if (m - i * s < 0) {
      break;
    }
    long long tm = m - i * s;
    long long mx1 = i * k + i;
    int cnt = n - i;
    int j = 0;
    while (true) {
      if (cnt == 0) {
        j++;
        cnt = n - i;
      }
      if (j == v.size()) {
        break;
      }
      if (tm / v[j] == 0) {
        break;
      }
      int k = min(tm / v[j], (long long)cnt);
      mx1 += k;
      tm -= k * v[j];
      cnt -= k;
    }
    mx = max(mx, mx1);
  }
  cout << mx << '\n';
  return 0;
}
