#include <bits/stdc++.h>
#define int long long

using namespace std;

vector <vector <int>> arr;
vector <int> s;
vector <int> cnt;
vector <int> P;
int V;

int go(int v) {
    if (s[v] <= s[V] && !P[v]) {
        cnt[v] = 0;
        return 0;
    }
    cnt[v] = 1;
    for (int to : arr[v]) {
        cnt[v] += go(to);
    }
    return cnt[v];
}

int ans = 0;

bool cut(int v) {
    if (v == V) return false;
    bool b = true;
    for (int to : arr[v]) {
        bool can_cut = cut(to);
        b = (b && can_cut);
        if (can_cut) ans = max(ans, cnt[to]);
    }
    return b;
}

signed main() {
    int n, q;
    cin >> n >> q;
    arr.resize(n);
    vector <int> pr(n);
    for (int i = 1; i < n; ++i) {
        int p;
        cin >> p;
        pr[i] = p - 1;
        p--;
        arr[p].push_back(i);
    }
    s.resize(n);
    for (int i = 0; i < n; ++i) {
        cin >> s[i];
    }
    while (q--) {
        cin >> V;
        V--;
        int v1 = V;
        P.clear();
        P.resize(n);
        while (v1 != 0) {
            P[pr[v1]] = 1;
        }
        cnt.clear();
        cnt.resize(n);
        go(0);
        ans = 0;
        cut(0);
        cout << cnt[0] - ans + 1 - (s[0] >= s[V]) << endl;
    }
    return 0;
}
