#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const long long MODPRIMA = (long long)1e9 + 7;
const long long MAXX = (long long)1e18;
const long long MINN = -(long long)1e18;
const double EPS = -1e9;
long long N, K, M;
long long ans, sum;
long long arr[50];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> K >> M;
  for (int i = 0; i < K; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  sort(arr, arr + K);
  if (N * sum <= M)
    cout << N * (K + 1) << '\n';
  else {
    long long bagi = (M / sum);
    long long ans = 0;
    for (int i = 0; i <= bagi; i++) {
      long long sisa = M - (sum * i);
      long long point = i * (K + 1);
      for (int j = 0; j < K; j++) {
        if (sisa >= arr[j] * (N - i)) {
          sisa -= (arr[j] * (N - i));
          point += (N - i);
        } else {
          long long bag = sisa / (arr[j]);
          point += bag;
          sisa -= (bag * arr[j]);
        }
      }
      ans = max(ans, point);
    }
    cout << ans << '\n';
  }
  return 0;
}
