#include <bits/stdc++.h>
using namespace std;
bool rev(long long x, long long y) { return x > y; }
void input_arr(long long a[], long long n) {
  for (long long i = 0; i < n; i += 1) cin >> a[i];
}
void print_vec(vector<long long> &v) {
  for (auto i : v) cout << i << " ";
  cout << endl;
}
void print_arr(long long a[], long long n) {
  for (long long i = 0; i < n; i += 1) cout << a[i] << " ";
  cout << endl;
}
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return a.second < b.second;
}
bool sortinrev(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.first > b.first);
}
bool sortinrevbysec(const pair<long long, long long> &a,
                    const pair<long long, long long> &b) {
  return (a.second > b.second);
}
template <typename... T>
void input(T &...args) {
  ((cin >> args), ...);
}
template <typename... T>
void print(T &&...args) {
  ((cout << args << endl), ...);
}
template <typename... T>
void deb(T &&...args) {
  cout << "~~ ";
  ((cout << args << " "), ...);
  cout << endl;
}
void stand8th() {
  long long n, k, m;
  input(n, k, m);
  long long a[k];
  input_arr(a, k);
  sort(a, a + k);
  long long ans1 = 0;
  long long ans2 = 0;
  long long summ = 0;
  for (long long i = 0; i < k; i += 1) summ += a[i];
  long long x = m % (summ * n);
  ans1 += (m / (n * summ)) * (k * n + n);
  ans1 += (x / summ) * (k + 1);
  long long y = n - x / summ;
  long long ans3 = ans1;
  x = x % summ;
  long long temp = x;
  for (long long i = 0; i < k; i += 1) {
    if (x >= a[i]) {
      x -= a[i];
      ans1 += 1;
    } else {
      break;
    }
  }
  long long b[k];
  long long sum1 = 0;
  for (long long i = 0; i < k; i += 1) {
    b[i] = a[i] * n;
    sum1 += b[i];
  }
  x = temp;
  long long c[k];
  long long ans4 = -1;
  for (long long y = 0; y < n + 1; y += 1) {
    x = m - y * (summ);
    if (x < 0) break;
    long long ans3 = y * (k + 1);
    for (long long i = 0; i < k; i += 1) {
      c[i] = a[i] * (n - y);
    }
    for (long long i = 0; i < k; i += 1) {
      if (x >= c[i]) {
        x -= c[i];
        if (i == k - 1) {
          ans3 += (n - y);
        }
        ans3 += (n - y);
      } else {
        ans3 += x / a[i];
        if (i == k - 1) {
          ans3 += x / a[i];
        }
        break;
      }
    }
    ans4 = max(ans4, ans3);
  }
  ans2 += (m / sum1) * (k * n + n);
  x = m % sum1;
  for (long long i = 0; i < k; i += 1) {
    if (x >= b[i]) {
      x -= b[i];
      if (i == k - 1) {
        ans2 += n;
      }
      ans2 += n;
    } else {
      ans2 += x / a[i];
      if (i == k - 1) {
        ans2 += x / a[i];
      }
      break;
    }
  }
  print(min(max(max(ans1, ans2), max(ans3, ans4)), n * k + n));
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tin = 1;
  while (tin--) {
    stand8th();
  }
  return 0;
}
