#include <bits/stdc++.h>
using namespace std;
const int N = 50;
int ar[N];
int main() {
  int n, k, m, i, j, sum = 0, dem, ans = 0, l, sum1;
  cin >> n >> k >> m;
  for (i = 1; i <= k; i++) {
    cin >> ar[i];
    sum += ar[i];
  }
  sort(ar + 1, ar + 1 + k);
  for (i = 0; i <= min(n, m / sum); i++) {
    dem = m - sum * i;
    sum1 = (k + 1) * i;
    for (j = 1; j <= k; j++) {
      l = min(n - i, dem / ar[j]);
      dem -= l * ar[j];
      sum1 += l;
    }
    ans = max(ans, sum1);
  }
  cout << ans;
}
