#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long dx[4] = {-1, 1, 0, 0};
const long long dy[4] = {0, 0, -1, 1};
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long n, m, k, l, y, x, z = 0, res = 0, ans = 0;
string s;
bool ok;
vector<long long> v;
void solve() {
  ans = 0;
  long long bigans = 0;
  cin >> n >> k >> m;
  long long sum = 0;
  for (int i = 0; i < k; i++) cin >> x, v.push_back(x), sum += x;
  sort(v.begin(), v.end());
  for (long long nbt = 0; nbt <= n; nbt++) {
    ans = 0;
    if (sum * nbt > m) continue;
    long long tmp = m;
    tmp -= sum * nbt;
    ans += nbt * (k + 1);
    int prb = 0;
    while (tmp && prb < k) {
      for (int i = nbt + 1; i <= n; i++)
        if (tmp - v[prb] >= 0) {
          ans += 1 + (prb == k - 1);
          tmp -= v[prb];
        }
      prb++;
    }
    bigans = max(ans, bigans);
  }
  cout << bigans << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
