#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, t;
  cin >> n >> k >> t;
  vector<int> v(k);
  for (int i = 0; i < k; ++i) cin >> v[i];
  sort(v.begin(), v.end());
  int sum = 0;
  for (int i = 0; i < v.size(); ++i) sum += v[i];
  long long res = 0;
  for (int f = 0; f <= n; ++f) {
    long long cur = f * (long long)sum;
    long long score = f * (k + 1);
    int rem = n - f;
    for (int j = 0; j < k && cur <= t; ++j)
      for (int i = 0; i < rem && cur <= t; ++i) {
        if (cur + v[j] > t) break;
        ++score;
        cur += v[j];
      }
    if (cur <= t) res = max(res, score);
  }
  cout << res << endl;
  return 0;
}
