#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, m;
  cin >> n >> k >> m;
  vector<int> in(k);
  for (int &e : in) cin >> e;
  sort(begin(in), end(in));
  const int A = accumulate(begin(in), end(in), 0);
  int ans = 0;
  for (int i = 0; i <= n; i++) {
    if (i * A > m) break;
    int points = i * (k + 1);
    int have = m - i * A;
    int g = n - i;
    for (int x : in) {
      int t = min(g, have / x);
      points += t;
      have -= t * x;
    }
    ans = max(ans, points);
  }
  cout << ans << endl;
}
