#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
queue <int> q;
const int MAXN = 1e5 + 7;
int n, m, k, ans;
vector <int> save;
vector <int> a[MAXN];
ll d_u[MAXN], d_v[MAXN];
void bfs(ll *dist, int s){
    fill(dist + 1, dist + 1 + n, INT_MAX);
    q.push(s);
    dist[s] = 0;
    while(!q.empty()){
        int u = q.front();
        q.pop();
        for(auto v : a[u]){
            if(dist[v] > dist[u] + 1){
                dist[v] = dist[u] + 1;
                q.push(v);
            }
        }
    }
    if(s == n)
        for(auto x : save) if(d_v[x] <= d_u[n]) ans++;
    
}


int main(){
    ios_base::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    cin >> n >> m >> k;
    for(int i = 1; i <= k; i++){
        int x;
        cin >> x;
        save.push_back(x);
    }
    for(int i = 1; i <= m; i++){
        int x, y;
        cin >> x >> y;
        a[x].push_back(y);
        a[y].push_back(x);
    }
    bfs(d_u, 1);
    bfs(d_v, n);
    cout << ans;
}