#include <bits/stdc++.h>
using namespace std;
long long n, k, tmm;
long long ara[110];
long long ff(long long motn, long long mottm) {
  long long foo = 0;
  for (int i = 1; i <= k; i++) {
    for (int j = 1; j <= motn; j++) {
      if (ara[i] + mottm <= tmm) {
        mottm += ara[i];
        foo++;
      }
    }
  }
  return foo;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  ;
  cin >> n >> k >> tmm;
  long long sum = 0;
  for (int i = 1; i <= k; i++) {
    cin >> ara[i];
    sum += ara[i];
  }
  sort(ara + 1, ara + 1 + k);
  long long ans = 0;
  for (int i = 0; i <= n; i++) {
    if ((sum * (long long)i) > tmm) {
      break;
    }
    ans =
        max(ans, ((long long)i * (k + 1LL)) + ff(n - i, (sum * (long long)i)));
  }
  cout << ans;
  return 0;
}
