#include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpl = vector<pair<ll, ll>>;
using pll = pair<ll, ll>;
#define rep(i, k, n) for(ll i = k; i < n; i++)
#define pb push_back
#define mp make_pair

//dijkstra + bitDP

ll n, m, k;
const ll INF = 10000000000000;
vll c(21);
vvll G(300000, vll(0));
vll dist(300000);
vvll cost(21, vll(21));
priority_queue<pll, vpl, greater<pll>> Q;

//dp[bit][v]:集合bitについて最後をvとして順序を最適化した時の最小コスト
vvll dp((1<<21)+1, vll(21));

ll rec(ll bit, ll v){
    //探索済みならリターン
    if(dp[bit][v] != -1) return dp[bit][v];

    //初期化(bitがvのみ)
    if(bit == (1<<v)) return dp[bit][v] = 0;

    //答えの変数
    ll res = INF;

    //bitからvを除いたもの
    ll prev_bit = bit & ~(1<<v);

    //vの一つ手前のuについて全探索
    rep(u, 0, k){
        //uがprev_bitに含まれない場合スルー
        if(!(prev_bit & (1<<u))) continue;

        //再帰的に探索
        if(res > rec(prev_bit, u) + cost[u][v]){
            res = rec(prev_bit, u) + cost[u][v];
        }
    }

    //メモ化してリターン
    return dp[bit][v] = res;
}


int main(){
    cin >> n >> m;
    rep(i, 0, m){
        ll a, b;
        cin >> a >> b;
        G[a].pb(b);
        G[b].pb(a);
    }

    cin >> k;
    rep(i, 0, k){
        cin >> c[i];
    }

    bool flag = true;

    rep(i, 0, k){
        //距離の初期化
        rep(j, 1, n+1){
            dist[j] = INF;
        }

        //優先度付きキューに(距離, 頂点番号)の組を入れる
        Q.push(mp(0, c[i]));
        dist[c[i]] = 0;
        while(!Q.empty()){
            ll pos = Q.top().second;
            Q.pop();
            rep(i, 0, G[pos].size()){
                ll to = G[pos][i];
                //posを経由してtoに行く距離がdist[to]より短ければ
                //dist[to]を更新してキューに入れる
                if(dist[to] > dist[pos] + 1){
                    dist[to] = dist[pos] + 1;
                    Q.push(mp(dist[to], to));
                }
            }
        }

        //コストの配列を作って入れる
        vll record(0);
        rep(j, 0, k){
            if(dist[c[j]] == INF){
                flag = false;
                break;
            }

            record.pb(dist[c[j]]);
        }
        cost[i] = record;
    }

    
    if(flag){
        //dpテーブルを-1で初期化
        rep(i, 0, (1<<k)){
            rep(j, 0, k){
                dp[i][j] = -1;
            }
        }

        //探索
        ll res = INF;
        rep(v, 0, k){
            if(res > rec((1<<k)-1, v)){
                res = rec((1<<k)-1, v);
            }
        }

        cout << res+1 << endl;
    }
    else cout << -1 << endl;

    return 0;
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

ll x,y,r,ans;

ll inp(){
    string s;
    bool f=true,neg=false;
    cin>>s;
    if(s.front()=='-'){
        s.erase(s.begin());
        neg=true;
    }
    for(int i=0;i<s.size();i++)if(s[i]=='.'){
        while(s.size()<=i+4)s+='0';
        f=false;
    }
    if(f)s+="0000";
    ll res=0;
    for(char c:s)if(c!='.'){
        res=res*10+c-'0';
    }
    if(neg)res=-res;
    return res;
}

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    x=inp();y=inp();r=inp();
    ll px=x-r,lb=y+10000,rb=y-10000;
    while(lb%10000!=0)lb--;
    while(rb%10000!=0)rb++;
    while(px%10000!=0)px++;
    for(;px<=x+r;px+=10000){
        while(lb-10000>=y||(y-lb+10000)*(y-lb+10000)+(x-px)*(x-px)<=r*r)lb-=10000;
        while(rb+10000<=y||(rb-y+10000)*(rb-y+10000)+(x-px)*(x-px)<=r*r)rb+=10000;
        while((y-lb)*(y-lb)+(x-px)*(x-px)>r*r&&lb<y)lb+=10000;
        while((rb-y)*(rb-y)+(x-px)*(x-px)>r*r&&rb>y)rb-=10000;
        ans+=max(0ll,(rb-lb)/10000+1);
    }
    cout<<ans<<endl;

    return 0;
}