#include <bits/stdc++.h>
using namespace std;
const int maxn = 50005;
const long long mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double eps = 1e-6;
int n, k, m;
int a[maxn];
int main() {
  while (~scanf("%d%d%d", &n, &k, &m)) {
    int sum = 0;
    for (int i = 0; i < k; i++) {
      scanf("%d", &a[i]);
      sum += a[i];
    }
    sort(a, a + k);
    int ans = 0;
    for (int i = 0; i <= n; i++) {
      if (sum * i > m) break;
      int cnt = (k + 1) * i;
      int temp = m - sum * i;
      int now = 0;
      while (1) {
        for (int j = 1; j <= n - i; j++) {
          temp -= a[now];
          if (temp >= 0) cnt++;
          if (temp <= 0) break;
        }
        now++;
        if (now == k) break;
        if (temp <= 0) break;
      }
      ans = max(ans, cnt);
    }
    printf("%d\n", ans);
  }
  return 0;
}
