#include "bits/stdc++.h"
using namespace std;
# define int long long
# define all(a) a.begin(), a.end()

inline void solve(){

}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    int n, m, T;
    cin >> n >> m >> T;
    vector<int> a(n);
    for(auto &i : a) cin >> i;
    vector<int> p(n + 1);
    for(int i = 0; i < n; ++i){
        p[i + 1] = p[i] + a[i];
    }
    vector<int> ans(n);
    auto check =[&](int l, int r){
        return (r-l + 1) + (T - p[r + 1] + p[l]) * 1.0 / a[l];
    };
    int l = 0;
    for(int i = 0; i < n; ++i){
        if(check(l, i) < check(i, i)){
            l = i;
        }
        while(l < i && check(l, i) <= check(l + 1, i)){
            ++l;
        }
        ans[i] = check(l, i);
    }
    auto check2 = [&](int l, int r){
        return (r-l + 1) + (T - p[r + 1] + p[l]) * 1.0 / a[r];
    };
    int r = n - 1;
    for(int i = n - 1; i >= 0; --i){
        while(r > i && check2(i, r) <= check2(i, r - 1)){
            --r;
        }
//        if(check2(i, r) < check2(i, i)){
//            r = i;
//        }
        ans[i] = max<int>(ans[i], check2(i, r));
    }
    int res = 0;
    for(int i = 0; i < m; ++i){
        int s;
        cin >> s;
        --s;
        res = max(res, ans[s]);
    }
    cout << res << '\n';
    return 0;
}