#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, M;
  cin >> n >> k >> M;
  long long time[50];
  long long sum = 0;
  for (int i = 0; i < k; i++) {
    cin >> time[i];
    sum += time[i];
  }
  sort(time, time + k);
  long long tmp, ans, max_point = 0, cnt = 0;
  for (int i = 0; i <= n; i++) {
    tmp = M - sum * i;
    if (tmp < 0) break;
    ans = (k + 1) * i;
    for (int j = 0; j < k; j++) {
      cnt = min(n - i, tmp / time[j]);
      tmp -= cnt * time[j];
      ans += cnt;
    }
    max_point = max(max_point, ans);
  }
  cout << max_point << endl;
  return 0;
}
