#include <bits/stdc++.h>
using namespace std;
const int MAXN = 45;
int t[MAXN + 1], n, k, M;
int comp(int n, int M) {
  int score = 0, i = 1;
  while (M && i <= k - 1) {
    if (n * t[i] <= M) {
      M -= n * t[i];
      score += n;
    } else {
      score += (M / t[i]);
      break;
    }
    i++;
  }
  return score;
}
int main() {
  int totalSum = 0;
  cin >> n >> k >> M;
  for (int i = 1; i <= k; i++) {
    cin >> t[i];
    totalSum += t[i];
  }
  sort(t + 1, t + k + 1);
  int score = 0, maxScore = 0, maxCompleteTasks = min(M / totalSum, n);
  for (int i = 0; i <= maxCompleteTasks; i++) {
    maxScore =
        max(k * i + i + (n != i) * comp(n - i, M - i * totalSum), maxScore);
  }
  cout << maxScore;
  return 0;
}
