#include <bits/stdc++.h>
using namespace std;
long long M;
int N, K;
long long costs[50];
int greedy_subtasks(long long budget, int tasks) {
  int score = 0;
  for (int i = 0; i < K; i++) {
    int to_solve = budget / costs[i];
    to_solve = min(to_solve, tasks);
    budget -= to_solve * costs[i];
    score += to_solve;
  }
  return score;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N >> K >> M;
  long long task_cost = 0;
  for (int i = 0; i < K; i++) {
    cin >> costs[i];
    task_cost += costs[i];
  }
  sort(costs, costs + K);
  int best = 0;
  for (int i = 0; i <= N; i++) {
    long long budget = M - task_cost * i;
    if (budget < 0) continue;
    int cur = (i * (K + 1)) + greedy_subtasks(budget, N - i);
    best = max(best, cur);
  }
  cout << best << endl;
  return 0;
}
