#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
const int N = 100000;
vector<int> g[N];
bool captured[N];
int cnt[N];
int main()
{
int n, q;
cin >> n >> q;
for (int i = 0; i < n - 1; i++)
{
int a, b;
cin >> a >> b;
a--, b--;
g[a].push_back(b);
g[b].push_back(a);
}
int ans = 1;
for (int i = 0; i < n; i++)
{
cnt[i] = g[i].size();
}
for (int j = 0; j < q; j++)
{
int a;
cin >> a;
a--;
captured[a] = !captured[a];
int diff = captured[a] ? -1 : 1;
for (int i = 0; i < g[a].size(); i++)
{
int to = g[a][i];
cnt[to] += diff;
}
if (captured[a])
ans += cnt[a] - 1;
else
ans -= cnt[a] - 1;
cout << ans << endl;
}
}