#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, nn, i, j, p = 0, l, sum = 0, a[46], x = 0, maxx = 0;
  cin >> n >> k >> m;
  for (i = 0; i < k; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + k);
  for (l = 0; l < n; l++) {
    nn = m;
    if (sum * l > m) continue;
    m -= sum * l;
    p += (k + 1) * l;
    for (i = 0; i < k; i++) {
      for (j = 0; j < n - l; j++) {
        if (m - a[i] < 0) {
          x = 1;
          break;
        }
        if (i == k - 1)
          p += 2;
        else
          p++;
        m -= a[i];
      }
      x = 0;
    }
    m = nn;
    maxx = max(maxx, p);
    p = 0;
  }
  cout << maxx << endl;
  return 0;
}
