#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long powmod(long long a, long long b, long long MOD) {
  long long ans = 1ll;
  while (b) {
    if (b & 1) ans = ans * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return ans;
}
inline void getInt(int* p);
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
long long n;
long long k;
long long m;
long long a[maxn];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k >> m;
  long long base = 0ll;
  for (int i = 1; i <= k; i++) {
    cin >> a[i];
    base += a[i];
  }
  sort(a + 1, a + 1 + k);
  long long ans = 0ll;
  for (int com = 0; com <= n; com++) {
    if (com * 1ll * base > m) {
      break;
    }
    long long fans = 0ll;
    fans += 1ll * com * (k + 1ll);
    long long fm = m - 1ll * com * base;
    for (int i = 1; i <= k; ++i) {
      for (int j = 1; j <= n - com; j++) {
        if (fm >= a[i]) {
          fm -= a[i];
          fans++;
          if (i == k) {
            fans++;
          }
        }
      }
    }
    ans = max(ans, fans);
  }
  cout << max(ans, 0ll) << endl;
  return 0;
}
inline void getInt(int* p) {
  char ch;
  do {
    ch = getchar();
  } while (ch == ' ' || ch == '\n');
  if (ch == '-') {
    *p = -(getchar() - '0');
    while ((ch = getchar()) >= '0' && ch <= '9') {
      *p = *p * 10 - ch + '0';
    }
  } else {
    *p = ch - '0';
    while ((ch = getchar()) >= '0' && ch <= '9') {
      *p = *p * 10 + ch - '0';
    }
  }
}
