#include <bits/stdc++.h>
// #include<ext/pb_ds/assoc_container.hpp>
// #include<ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;

#define int long long
const int INF = 1e18;

void solve1();

// typedef tree<int,null_type,less<>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie();
    cout.tie();
    int qwerty = 1;
    // cin >> qwerty;
    while(qwerty--){
        solve1();
    }
}

struct now{
    int who, ost, fir, sd;
};

void solve1(){
    int n, m, t;
    cin >> n >> m >> t;
    vector<int> a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    vector<vector<int>> gr(n);
    for(int i = 0; i < n; i++){
        if(i > 0){
            gr[i].push_back(i - 1);
        }
        if(i + 1 < n){
            gr[i].push_back(i + 1);
        }
    }
    deque<int> bfs;
    vector<int> ans(n);
    vector<vector<now>> in(n);
    for(int i = 0; i < n; i++){
        in[i].push_back({i, t, i, 0});
        bfs.push_back(i);
        ans[i] = t / a[i];
    }
    while(!bfs.empty()){
        auto x = bfs.front();
        bfs.pop_front();
        auto top = in[x].back();
        in[x].pop_back();
        int who = top.who;
        int ost = top.ost;
        int fir = top.fir;
        int sd = top.sd;
        for(int u : gr[who]){
            int ne = max(0ll, (ost - a[u]) / a[fir]) + 1 + sd;
            if(ne > ans[u]){
                ans[u] = ne;
                if(in[u].empty()){
                    bfs.push_back(u);
                }
                in[u].clear();
                in[u].push_back({u, ost - a[u], fir, sd + 1});
            }
        }
    }
    int mx = 0;
    while(m--){
        int x;
        cin >> x;
        x--;
        mx = max(mx, ans[x]);
    }
    cout << mx;
}
