#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n, k, m;
  cin >> n >> k >> m;
  long long a[k + 1];
  long long A = 0;
  for (long long i = 1; i <= k; i++) {
    cin >> a[i];
    A += a[i];
  }
  sort(a + 1, a + 1 + k);
  long long answ = 0;
  for (long long i = 0; i <= n; i++) {
    if (A * i > m) break;
    long long cur = (k + 1) * i;
    long long c = m - (i * A);
    for (long long j = 1; j <= k; j++) {
      for (long long l = i + 1; l <= n; l++) {
        if (a[j] <= c) {
          c -= a[j];
          cur++;
        }
      }
    }
    answ = max(answ, cur);
  }
  cout << answ << endl;
  return 0;
}
