#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K, M;
  cin >> N >> K >> M;
  vector<int> a(K);
  int tot = 0;
  for (int x = 0; x < K; x++) {
    cin >> a[x];
    tot += a[x];
  }
  sort(a.begin(), a.end());
  int mp = 0;
  for (int y = 0; y <= N; y++) {
    int m2 = M - y * (tot);
    int pt = K * y + y;
    if (m2 < 0) break;
    for (int x = 0; x < K; x++) {
      for (int z = y + 1; z <= N; z++) {
        if (m2 < a[x]) {
          break;
        } else {
          m2 -= a[x];
          pt++;
        }
      }
      if (m2 < a[x]) break;
    }
    mp = max(mp, pt);
  }
  cout << mp << endl;
  return 0;
}
