#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include using namespace std; vector G[100100]; int B[100100]; int main(){ int n,m; cin>>n>>m; vector> A(n); vector AA(n); rep(i,n){ int a; cin>>a; AA[i]=a; A[i]={a,i}; } sort(ALL(A)); rep(i,m){ int u,v; cin>>u>>v; u--,v--; G[u].push_back(v); G[v].push_back(u); } int k; cin>>k; rep(i,k){ int b; cin>>b; b--; B[b]=1; } vector C; rep(i,n){ int ta=A[i].first; int ti=A[i].second; if(B[ti]==1){ C.push_back(ti+1); B[ti]=0; for(auto x:G[ti]){ if(AA[x]>ta) B[x]=1-B[x]; } } } cout<<(int)C.size()<