#include <bits/stdc++.h>
using namespace std;
int n, k, M, res, sum;
int t[50], cnt[50];
bool outed[5000];
vector<int> in;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k >> M;
  for (int i = 1; i <= k; i++) {
    cin >> t[i];
    sum += t[i];
  }
  sort(t + 1, t + k + 1);
  for (int i = 0; i <= n; i++) {
    int tmpres = 0;
    if (1ll * i * sum <= M) {
      int tmp = i * sum;
      tmpres = k * i + i;
      for (int sub = 1; sub <= k; sub++)
        for (int task = i + 1; task <= n; task++)
          if (tmp + t[sub] <= M) {
            tmp += t[sub];
            tmpres++;
            if (sub == k) tmpres++;
          }
    }
    res = max(res, tmpres);
  }
  cout << res;
  return 0;
}
