#include <bits/stdc++.h>
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define endl '\n'
typedef long long ll;
using namespace std;

const int N = 3e5 + 5;
ll a[N], b[N], pref[N];
ll ans[N];

void solve() {
    int n, m;
    ll t;
    cin >> n >> m >> t;

    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        pref[i] = pref[i - 1] + a[i];
    }

    int x;
    cin >> x;

    ll ans = 0;
    for (int i = x; i > 0; i--) {
        ll sum = pref[x] - pref[i];
        if (sum > t) break;

        ans = max(ans, x - i + ((t - sum) / a[i]));
    }
    cout << ans << endl;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    solve();
}
