#include <bits/stdc++.h>
using namespace std;
int arr[1000003];
int main() {
  int n, k, m;
  int sum = 0;
  cin >> n >> k >> m;
  for (int i = 0; i < k; i++) cin >> arr[i];
  for (int i = 0; i < k; i++) sum += arr[i];
  sort(arr, arr + k);
  int res = 0;
  for (int i = 0; i <= n; i++) {
    int temp = 0, temp2 = m;
    if (sum * i <= m) {
      m -= sum * i;
      temp += (k + 1) * i;
      for (int j = 0; j < k; j++) {
        if ((n - i) * arr[j] <= m) {
          temp += n - i;
          m -= (n - i) * arr[j];
        } else {
          temp += m / arr[j];
          break;
        }
      }
      m = temp2;
      res = max(temp, res);
    }
  }
  cout << res << "\n";
  return 0;
}
