#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k;
  long long int m, s = 0;
  cin >> n >> k >> m;
  vector<long long int> v(k);
  for (int i = 0; i < k; i += 1) {
    cin >> v[i];
    s += v[i];
  }
  sort(v.begin(), v.end());
  long long int ans = LONG_MIN;
  int num = min(m / s, (long long int)n);
  for (int i = 0; i < num + 1; i += 1) {
    long long int cnt = i * (k + 1), temp = m - (i * s);
    int fl = 0;
    for (int j = 0; j < k; j += 1) {
      for (int l = 0; l < n - i; l += 1) {
        if (temp < v[j]) {
          fl = 1;
          break;
        } else {
          temp -= v[j];
          cnt += 1 + (j == k - 1 ? 1 : 0);
        }
      }
      if (fl == 1) break;
    }
    ans = max(ans, cnt);
  }
  cout << ans;
}
