#include <bits/stdc++.h>
using namespace std;
const int N = 1000007, inf = 0x3f3f3f3f;
int v[50];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  long long m, tot = 0;
  cin >> n >> k >> m;
  for (int i = 0; i < k; ++i) {
    cin >> v[i];
    tot += v[i];
  }
  sort(v, v + k);
  long long ans = 0, cur, aux;
  for (int i = 0; i <= n; ++i) {
    cur = m - tot * i;
    aux = k * i + i;
    if (cur < 0) continue;
    for (int j = 0; j < k; ++j) {
      int x = cur / v[j];
      x = min(x, n - i);
      aux += x;
      cur -= x * v[j];
    }
    ans = max(ans, aux);
  }
  cout << ans << endl;
}
