#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5;
long long n, k, M, S, a[MAXN], sum, all, ans, MAX;
int main() {
  cin >> n >> k >> S;
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + k);
  for (int r = 0; r <= n; r++) {
    M = S;
    M -= r * sum;
    MAX = r * (k + 1);
    if (M < 0) continue;
    for (int i = 0; i < k; i++) {
      for (int j = 0; j < n - r; j++) {
        if (M - a[i] >= 0) {
          M -= a[i];
          MAX++;
        }
      }
    }
    ans = max(ans, MAX);
  }
  cout << ans;
  return 0;
}
