#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, i, j, k, l = 0, ans = 0, sum = 0, x, y, z, mx = 0, mn = 2e9,
                           a[100005] = {0}, flag = 0, temp, rem;
  cin >> n >> k >> m;
  for (i = 0; i < k; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + k);
  for (i = 0; i <= n; i++) {
    temp = m;
    if (sum * i <= m) {
      temp = temp - sum * i;
      ans = i * (k + 1);
      rem = n - i;
      for (j = 0; j < k; j++) {
        if (rem * a[j] > temp) {
          x = temp / a[j];
          temp = 0;
          ans += x;
        } else {
          temp = temp - rem * a[j];
          ans += rem;
        }
      }
    }
    l = max(l, ans);
  }
  cout << l;
  return 0;
}
