#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = 10000000;
vector<int> g[100005];
bool bad[100005];
pair<int, int> dist[100005][2];
int n, d, m;
int par[100005];
void calc(int u, int p = -1) {
  par[u] = p;
  vector<pair<int, int> > vec(2, pair<int, int>(-1, -1));
  if (bad[u]) vec[0] = make_pair(0, -1);
  for (int i = 0; i < (((int)(g[u]).size())); i++) {
    int v = g[u][i];
    if (v == p) continue;
    calc(v, u);
    int x = dist[v][0].first;
    if (x != -1) x++;
    vec.push_back(make_pair(x, v));
  }
  sort((vec).begin(), (vec).end(), greater<pair<int, int> >());
  dist[u][0] = vec[0];
  dist[u][1] = vec[1];
}
int solve(int u, int p = -1, int dd = -1) {
  int ans = 0;
  for (int i = 0; i < (((int)(g[u]).size())); i++) {
    int v = g[u][i];
    if (v == p) continue;
    int x = dd;
    if (x != -1) x++;
    if (dist[u][0].second != v) {
      int y = dist[u][0].first;
      if (y != -1) y++;
      x = max(x, y);
    } else {
      int y = dist[u][1].first;
      if (y != -1) y++;
      x = max(x, y);
    }
    ans += solve(v, u, x);
  }
  int mdist = max(dd, dist[u][0].first);
  if (mdist <= d) ans++;
  return ans;
}
int main() {
  cin >> n >> m >> d;
  int x;
  while (m--) {
    cin >> x;
    bad[--x] = 1;
  }
  int a, b;
  for (int i = 0; i < (n - 1); i++) {
    cin >> a >> b;
    g[--a].push_back(--b);
    g[b].push_back(a);
  }
  calc(0);
  cout << solve(0) << endl;
  return 0;
}
