#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, M;
  cin >> n >> k >> M;
  long long ti[k];
  long long takeAll = 0;
  for (long long i = 0; i < k; i++) {
    cin >> ti[i];
    takeAll += ti[i];
  }
  sort(ti, ti + k);
  long long maxi = 0;
  long long t = 0;
  long long j, score;
  for (long long i = 0; i < n; i++) {
    score = 0;
    if (takeAll * i > M)
      break;
    else {
      t = takeAll * i;
      score += (k + 1) * i;
      for (j = 0; j < k; j++) {
        if (t == M) break;
        long long taken = 0;
        if (t + ((n - i) * ti[j]) <= M) {
          t += (n - i) * ti[j];
          score += (n - i);
          taken = n - i;
        } else {
          taken = (M - t) / ti[j];
          score += taken;
          t += taken * ti[j];
        }
        if (j == k - 1) {
          score += taken;
        }
      }
    }
    maxi = max(maxi, score);
  }
  cout << maxi << endl;
}
