#include<bits/stdc++.h>

#define int long long
const int inf = 1e18;
using namespace std;

void XD_LMAO() {
    int n, m, t;
    cin >> n >> m >> t;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    vector<int> pre(n + 1);
    for (int i = 1; i <= n; i++) {
        pre[i] = pre[i - 1] + a[i - 1];
    }
    set<int> b;
    for (int i = 0; i < m; i++) {
        int x;
        cin >> x; x--;
        b.insert(x);
    }
    vector<int> ans(n, -inf);
    for (int i = 0; i < n; i++) {
        auto it = b.upper_bound(i);
        if (it != b.end()) {
            int x = *it;
            int s = pre[x] - pre[i];
            int cnt = abs(x - i);
            if (s <= t) {
                cnt += (t - s) / a[i];
                ans[i] = cnt;
            }
        }
        if (it != b.begin()) {
            int x = *prev(it);
            int s = pre[i] - pre[x];
            int cnt = abs(x - i);
            if (s <= t) {
                cnt += (t - s) / a[i];
                ans[i] = max(cnt, ans[i]);
            }
        }
    }
    int res = -inf;
    for (int i : ans) {
        res = max(res, i);
    }
    cout << res << '\n';
}

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int test_ = 1;
    while (test_--) {
        XD_LMAO();
    }
    return 0;
}
