#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 6;
int n, m, d;
bool devil[maxN];
vector<int> adj[maxN];
vector<int> ign[maxN];
int worst[maxN], pworst[maxN];
int ans;
void predfs(int, int);
void calc(int, int);
int main() {
  scanf("%d %d %d", &n, &m, &d);
  for (int i = 0; i <= m - 1; ++i) {
    int v;
    scanf("%d", &v);
    devil[v - 1] = 1;
  }
  for (int i = 0; i <= n - 2; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    b--;
    adj[a].push_back(b);
    ign[a].push_back(0);
    adj[b].push_back(a);
    ign[b].push_back(0);
  }
  predfs(0, -1);
  for (int i = 0; i <= n - 1; ++i) {
  }
  pworst[0] = 0;
  calc(0, -1);
  printf("%d\n", ans);
}
void predfs(int u, int p) {
  worst[u] = 0;
  int lmax = 0;
  for (int i = 0; i <= ((int)(adj[u].size())) - 1; ++i) {
    int v = adj[u][i];
    if (v != p) {
      predfs(v, u);
      ign[u][i] = lmax;
      if (worst[v] > 0 || devil[v]) lmax = max(lmax, worst[v] + 1);
      if (worst[v] > 0 || devil[v]) worst[u] = max(worst[v] + 1, worst[u]);
    }
  }
  int rmax = 0;
  for (int i = ((int)(adj[u].size())) - 1; i >= 0; --i) {
    int v = adj[u][i];
    if (v != p) {
      ign[u][i] = max(ign[u][i], rmax);
      if (worst[v] > 0 || devil[v]) rmax = max(rmax, worst[v] + 1);
    }
  }
}
void calc(int u, int p) {
  if (worst[u] <= d) {
    ans++;
  }
  for (int i = 0; i <= ((int)(adj[u].size())) - 1; ++i) {
    if (adj[u][i] != p) {
      ign[u][i] = max(ign[u][i], pworst[u]);
    }
  }
  for (int i = 0; i <= ((int)(adj[u].size())) - 1; ++i) {
    int v = adj[u][i];
    if (v != p) {
      if (ign[u][i] > 0) {
        worst[v] = max(worst[v], ign[u][i] + 1);
        pworst[v] = ign[u][i] + 1;
      } else if (devil[u]) {
        worst[v] = max(worst[v], 1);
        pworst[v] = 1;
      }
      calc(v, u);
    }
  }
}
