#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

int T;
vector<int> a;
int mx = 0;

void dfs(int v, int t = 0, int cnt = 0) {
  if(t >= T) {
    mx = max(mx, cnt - (t != T));
    if(mx > 4)  {
      cout << "!";
    }
    return;
  }

  int z[] = {v-1, v, v+1};
  for(auto &u : z) {
    if(u < 0 || u >= a.size()) continue;
    dfs(u, t+a[u], cnt+1);
  }
}


void solve() {

  int n,m; cin >> n >> m >> T;
  a.resize(n); for(int &i : a) cin >> i;
  

  while(m--) {
    int st; cin >> st, --st;
    dfs(st, a[st], 1);
  }

  cout << mx << '\n';


  return;
}


signed main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef pcms2
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
#endif
  // int tt; cin >> tt; while(tt--)
  solve();

  return 0;
}