#include <bits/stdc++.h>
using namespace std;
int n, k, M;
int a[100];
int ans;
int sum;
int main() {
  while (scanf("%d%d%d", &n, &k, &M) != EOF) {
    ans = 0;
    sum = 0;
    for (int i = 0; i < k; i++) {
      scanf("%d", &a[i]);
      sum += a[i];
    }
    sort(a, a + k);
    for (int i = 0; i <= n; i++) {
      int score = (k + 1) * i;
      int newM = M - sum * i;
      int newN = n - i;
      if (newM < 0) break;
      for (int j = 0; j < k; j++) {
        for (int p = 1; p <= newN && newM >= a[j]; p++) {
          score++;
          newM -= a[j];
        }
      }
      ans = max(ans, score);
    }
    printf("%d\n", ans);
  }
  return 0;
}
