#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
int n;
ll T;
vector <ll> pref;
vector <ll> val;

ld get(int i, int j) {
    ld ans = T - (pref[j] - (i - 1 > -1 ? pref[i - 1] : 0ll));
    if (ans < 0) return 0;
    ans /= (ld) val[j];
    ans += (ld) (j - i + 1);
    return ans;
}

ll get_ans(vector <ll> &a, vector <int> &used) {
    val = a;
    pref.assign(n, 0ll);
    for (int i = 0; i < n; i++) {
        pref[i] = val[i];
        if (i != 0) {
            pref[i] += pref[i - 1];
        }
    }
    ll ans = 0ll;
    for (int i = 0; i < n; i++) {
        if (!used[i]) continue;
        int l = i;
        int r = n - 1;
        while (r - l > 3) {
            int m1 = l + (r - l) / 3;
            int m2 = l + 2 * (r - l) / 3;
            ld x1 = get(i, m1);
            ld x2 = get(i, m2);
            ans = max(ans, (ll) x1);
            if (x1 < x2) {
                l = m1;
            } else {
                r = m2;
            }
        }
        while (l <= r) {
            ans = max(ans, (ll) get(i, l++));
        }
    }
    return (ll) ans;
}

void solve() {
    int m;
    cin >> n >> m >> T;
    vector <ll> a(n, 0);
    vector <int> used_f(n, 0), used_s(n, 0);
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int j = 0; j < m; j++) {
        int x; cin >> x;
        x--;
        used_f[x] = 1;
        used_s[n - 1 - x] = 1;
    }
    ll ans = get_ans(a, used_f);
    reverse(a.begin(), a.end());
    ans = max(ans, get_ans(a, used_s));
    cout << ans << endl;
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int test = 1;
    for (int i = 0; i < test; i++) {
        solve();
    }
}
