#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()

using namespace std;

template<class C> using vec = vector<C>;
using vi = vector<int>;
using pii = pair<int, int>;
using vpi = vec<pii>;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    int n, tt;
    cin >> n >> tt;
    vi p(n);
    vec<vi> g(n);
    for (int i = 1; i < n; i++) {
        int pr;
        cin >> pr;
        pr--;
        g[pr].push_back(i);
    }
    vi s(n);
    for (int i = 0; i < n; i++) {
        cin >> s[i];
    }

    const int LG = 19;
    vi tin(n), tout(n);
    vec<vi> up(n, vi(LG));
    vec<vi> up_mn(n, vi(LG));
    vi depth(n);
    int timer = 0;
    function<void(int, int)> dfs1 = [&](int v, int pr) {
        up[v][0] = pr;
        up_mn[v][0] = min(s[v], s[pr]);
        for (int l = 1; l < LG; l++) {
            up[v][l] = up[up[v][l - 1]][l - 1];
            up_mn[v][l] = min(up_mn[v][l - 1], up_mn[up[v][l - 1]][l - 1]);
        }
        tin[v] = timer++;
        for (auto& to : g[v]) {
            depth[to] = depth[v] + 1;
            dfs1(to, v);
        }
        tout[v] = timer++;
    };
    dfs1(0, 0);
    auto is_anc = [&](int u, int v) -> bool {
        return tin[u] <= tin[v] && tout[u] >= tout[v];
    };
    function<int(int, int)> lca = [&](int u, int v) {
        if (is_anc(u, v)) return u;
        if (is_anc(v, u)) return v;
        for (int l = LG - 1; l >= 0; l--) {
            if (!is_anc(up[u][l], v)) {
                u = up[u][l];
            }
        }
        return up[u][0];
    };
    function<int(int, int)> get_mn = [&](int v, int len) {
        len--;
        int res = s[v];
        for (int l = LG - 1; l >= 0; l--) {
            if ((len >> l) & 1) {
                res = min(res, up_mn[v][l]);
                v = up[v][l];
            }
        }
        return res;
    };
    auto get_ans = [&](int i) {
        vi d(n);
        for (int j = 0; j < n; j++) {
            if (is_anc(i, j)) continue;
            if (is_anc(j, i)) {
                d[j] = 1;
                continue;
            }
            int lc = lca(i, j);
            int resi = get_mn(i, depth[i] - depth[lc]);
            int resj = get_mn(j, depth[j] - depth[lc]);
            if (resj > resi) {
                d[j] = 1;
            }
        }
        int res = count(all(d), 1ll);
        for (int j = n - 1; j >= 0; j--) {
            for (auto& to : g[j]) {
                d[j] += d[to];
            }
        }

        int mx = 0;
        for (int j = n - 1; j >= 0; j--) {
            if (!is_anc(j, i) && !is_anc(i, j)) {
                mx = max(mx, d[j]);
            }
        }
        return res - mx;
    };
    while (tt--) {
        int u;
        cin >> u;
        u--;
        cout << get_ans(u) << '\n';
    }
}