#include <bits/stdc++.h>
using namespace std;
#define int long long

int get(int l, int r, vector<int> & pref) {
    if (r < l) return 0;
    return (pref[r] - (l ? pref[l - 1] : 0));
}

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    int n, m, t; cin >> n >> m >> t;
    vector<int> a(n), is(n), pref(n);
    for (auto & it : a) cin >> it;
    for (int i = 0; i < n; ++i) {
        pref[i] = (i ? pref[i - 1] : 0) + a[i];
    }
    for (int i = 0; i < m; ++i) {
        int pos; cin >> pos;
        is[pos - 1] = 1;
    }
    vector<int> l(n), r(n);
    int last = -1;
    for (int i = 0; i < n; ++i) {
        if (is[i]) last = i;
        l[i] = last;
    }
    last = -1;
    for (int i = n - 1; i >= 0; --i) {
        if (is[i]) last = i;
        r[i] = last;
    }
    int ans = 0;
    for (int i = 0; i < n; ++i) {
        if (l[i] != -1) {
            ans = max(ans, (t - get(l[i], i - 1, pref)) / a[i] + abs(l[i] - i));
        }
        if (r[i] != -1) {
            ans = max(ans, (t - get(i + 1, r[i], pref)) / a[i] + abs(r[i] - i));
        }
    }
    cout << ans << "\n";
    return 0;
}
