#include <bits/stdc++.h>
using namespace std;
int arr[(int)2e5 + 100];
int solve(int n, int m, int k) {
  if (n == 0 || m == 0) return 0;
  int in = 0, rem = m, ans = 0;
  while (in < k && rem >= arr[in]) {
    int times = rem / arr[in];
    times = min(times, n);
    ans += times;
    rem -= times * arr[in];
    in++;
  }
  return ans;
}
int main() {
  int n, k, m, totalTime = 0;
  scanf("%d", &n);
  scanf("%d", &k);
  scanf("%d", &m);
  for (int i = 0; i < k; i++) {
    scanf("%d", &arr[i]);
    totalTime += arr[i];
  }
  sort(arr, arr + k);
  int ans = 0;
  for (int i = 0; i <= n; i++) {
    if (m - i * totalTime >= 0) {
      int temp = (k + 1) * i;
      temp += solve(n - i, m - i * totalTime, k);
      ans = max(ans, temp);
    }
  }
  cout << ans;
  return 0;
}
