#include <bits/stdc++.h>
using namespace std;
long long point[1000006];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  for (int i = 0; i < 1000006; i++) {
    point[i] = 1e10;
  }
  long long n, k, m;
  cin >> n >> k >> m;
  long long a[k];
  long long sum = 0;
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + k);
  for (long long o = 0; o <= n; o++) {
    long long x = o * sum;
    long long y = o * (k + 1);
    point[y] = min(point[y], x);
    for (int i = 0; i < k; i++) {
      for (int j = o; j < n; j++) {
        x += a[i];
        y++;
        if (i + 1 == k) y++;
        point[y] = min(point[y], x);
      }
    }
  }
  long long res;
  for (int i = 0; i < 1000006; i++) {
    if (point[i] <= m) {
      res = i;
    }
  }
  cout << res << endl;
  return 0;
}
