#include <bits/stdc++.h>
using namespace std;
const int maxk = 45 + 5;
int t[maxk];
int main(void) {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  int sum = 0;
  for (int i = 0; i < k; i++) {
    scanf("%d", &t[i]);
    sum += t[i];
  }
  int count = m / sum;
  if (count >= n) {
    printf("%d", n * (k + 1));
  } else {
    sort(t, t + k);
    int res = -1;
    for (int i = 0; i <= count; i++) {
      int used = i * sum;
      int cur = i * (k + 1);
      for (int j = 0; j < k; j++) {
        if (m - used < t[j]) {
          break;
        } else {
          int extra = min(n - i, (m - used) / t[j]);
          used += extra * t[j];
          cur += extra;
          if (j == k - 1) {
            cur += extra;
          }
        }
      }
      res = max(res, cur);
    }
    printf("%d", res);
  }
  return 0;
}
