#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>;

#ifdef LOCAL
const int N = 100;
const int LG = 5;
#else
const int N = 300001;
const int LG = 18;
#endif

int up[LG][N];
int up_mn[N][LG];

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];
    }

    vi tin(n), tout(n);
    vi depth(n);
    int timer = 0;
    function<void(int, int)> dfs1 = [&](int v, int pr) {
        up[0][v] = pr;
        up_mn[0][v] = min(s[v], s[pr]);
        for (int l = 1; l < LG; l++) {
            up[l][v] = up[l - 1][up[l - 1][v]];
            up_mn[l][v] = min(up_mn[l - 1][v], up_mn[l - 1][up[l - 1][v]]);
        }
        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[l][u], v)) {
                u = up[l][u];
            }
        }
        return up[0][u];
    };
    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[l][v]);
                v = up[l][v];
            }
        }
        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';
    }
}