1 /*Author:WNJXYK*/
2 #include<cstdio>
3 using namespace std;
4
5 struct Edge{
6 int v;
7 int nxt;
8 Edge(){}
9 Edge(int a,int c){
10 v=a;nxt=c;
11 }
12 };
13 Edge e[200005];
14 int nume;
15 int head[30010];
16 bool del[30010];
17 int n,c,ans,w;
18
19 inline void addSingleEdge(int x,int y){
20 e[++nume]=Edge(y,head[x]);
21 head[x]=nume;
22 }
23 inline void addEdge(int x,int y){
24 addSingleEdge(x,y);
25 addSingleEdge(y,x);
26 }
27 bool visited[30010];
28 void dfs(int x){
29 ans--;
30 visited[x]=true;
31 for (int i=head[x];i;i=e[i].nxt){
32 if (visited[e[i].v]==false && del[e[i].v]==false) dfs(e[i].v);
33 }
34 }
35 int main(){
36 scanf("%d%d%d",&n,&c,&w);
37 for (int i=1;i<=c;i++){
38 int x,y;
39 scanf("%d%d",&x,&y);
40 addEdge(x,y);
41 }
42 for (int i=1;i<=w;i++){
43 int x;
44 scanf("%d",&x);
45 for (int j=head[x];j;j=e[j].nxt){
46 del[e[j].v]=true;
47 }
48 }
49 ans=n;
50 dfs(1);
51 printf("%d\n",ans);
52 return 0;
53 }