#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, sum = 0;
  cin >> n >> k >> m;
  vector<int> a(k);
  for (int &i : a) cin >> i, sum += i;
  sort(a.begin(), a.end());
  int ans = 0;
  for (int i = 0; i <= n; i++) {
    int tm = m, ta = 0;
    tm -= i * sum;
    ta += i * (k + 1);
    if (tm < 0) break;
    for (int j : a) {
      int tt = min(tm / j, n - i);
      tm -= tt * j;
      ta += tt;
    }
    ans = max(ans, ta);
  }
  cout << ans;
}
