#include <bits/stdc++.h>
using namespace std;
long long a[510];
int main() {
  ios::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  srand(time(NULL));
  long long n, k, m;
  cin >> n >> k >> m;
  long long sum = 0;
  for (int i = 0; i < k; i++) cin >> a[i], sum += a[i];
  sort(a, a + k);
  long long ans = -1;
  for (int all = 0; all <= n; all++) {
    long long can = m - sum * all;
    long long cnt = all * (k + 1);
    long long has = n - all;
    if (can < 0) break;
    for (int i = 0; i < k && can >= 0; i++) {
      long long take = min(has, can / a[i]);
      cnt += take;
      can -= take * a[i];
    }
    ans = max(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}
