#include <bits/stdc++.h>
using namespace std;
const int N = 50;
int n, k, M, t[N];
int main() {
  scanf("%d%d%d", &n, &k, &M);
  long long suma = 0;
  for (int i = 1; i <= k; ++i) {
    scanf("%d", &t[i]);
    suma += t[i];
  }
  int wyn = 0;
  sort(t + 1, t + k + 1);
  for (int I = 0; I <= n; ++I) {
    long long ile_musze = suma * I;
    int zysk = (k + 1) * I;
    for (int i = 1; i <= k; ++i) {
      int xd = max(0, min(n - I, (int)(M - ile_musze) / t[i]));
      zysk += xd;
      ile_musze += 1LL * t[i] * xd;
    }
    if (ile_musze <= M) {
      wyn = max(wyn, zysk);
    }
  }
  printf("%d\n", wyn);
  return 0;
}
