#include <bits/stdc++.h>
using namespace std;
long long N, K, M;
long long T[50];
long long S;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> K >> M;
  for (int i = 1; i <= K; i++) {
    cin >> T[i];
    S += T[i];
  }
  long long mx = 0;
  for (int c = 0; c <= N; c++) {
    if (S * c > M) break;
    long long p = c * K + c;
    long long m = M - c * S;
    vector<long long> V;
    for (int j = 1; j <= N - c; j++)
      for (int k = 1; k <= K; k++) V.push_back(T[k]);
    sort(V.begin(), V.end());
    for (long long Vi : V) {
      if (m < Vi) break;
      m -= Vi;
      p++;
    }
    mx = max(mx, p);
  }
  cout << mx << '\n';
  return 0;
}
