#include <bits/stdc++.h>
using namespace std;
int main() {
  int test = 1;
  while (test--) {
    int n, k;
    cin >> n >> k;
    long long int m, t[k], sum = 0;
    cin >> m;
    for (int i = 0; i < k; ++i) {
      cin >> t[i];
      sum += t[i];
    }
    if (sum * n <= m) {
      cout << n * (k + 1);
      exit(0);
    }
    vector<int> v;
    for (int i = 0; i < n; ++i) {
      if (1ll * i * sum <= m) v.push_back(i);
    }
    int arr[v.size()];
    memset(arr, 0, sizeof(arr));
    sort(t, t + k);
    for (int i = 0; i < v.size(); ++i) {
      long long int remtime = m - sum * i;
      int num = i * (k + 1);
      int flag = 0;
      for (int j = 0; j < k - 1; j++) {
        for (int l = 0; l < n - i; ++l) {
          if (remtime - t[j] < 0) {
            flag = 1;
            break;
          }
          num++;
          remtime -= t[j];
        }
        if (flag == 1) break;
      }
      if (flag == 0) {
        for (int l = 0; l < n - i; ++i) {
          if (remtime - t[k - 1] < 0) {
            flag = 1;
            break;
          }
          num += 2;
          remtime -= t[k - 1];
        }
      }
      arr[i] = num;
    }
    int maxi = 0;
    for (int i = 0; i < v.size(); ++i) {
      maxi = max(maxi, arr[i]);
    }
    cout << maxi;
  }
  return 0;
}
