#include <bits/stdc++.h>
using namespace std;
int t[50];
int main() {
  int n, k, m, sum = 0;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 0; i < k; i++) {
    scanf("%d", &t[i]);
    sum += t[i];
  }
  sort(t, t + k);
  int ans = 0;
  for (int i = 0; i <= n && m - sum * i >= 0; i++) {
    int re = m - sum * i;
    int temp = (k + 1) * i;
    for (int j = 0; j < k; j++) {
      int cnt = max(0, min(re / t[j], n - i));
      re -= cnt * t[j];
      temp += cnt;
    }
    ans = max(temp, ans);
  }
  printf("%d\n", ans);
  return 0;
}
