#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 79, block = 350;
int n, m, timer = 0;
vector<int> p(maxn, -1), t(maxn), q(maxn), h(maxn), tin(maxn), tout(maxn),
    s(maxn, 0), in, ans(maxn, 0), on(maxn, 0), b(maxn, 0), cnt(maxn * 2, 0);
vector<vector<int> > g(maxn);
void dfs_times(int v) {
  tin[v] = timer++;
  for (int i : g[v]) dfs_times(i);
  tout[v] = timer - 1;
}
bool is_ancestor(int u, int v) {
  return tin[u] <= tin[v] && tout[v] <= tout[u];
}
void virtual_tree(int v) {
  for (int i : g[v]) {
    virtual_tree(i);
    s[v] += s[i];
  }
  for (int i : g[v])
    if (s[i] == s[v]) h[v] = h[i];
  if (h[v] == -1 && s[v]) h[v] = v, in.push_back(v);
}
int bruteforce_answer(int v) {
  int on_a_holiday = on[v];
  for (int i : g[v]) on_a_holiday += bruteforce_answer(i);
  b[v] = t[v] - on_a_holiday;
  return on_a_holiday;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i < n; i++) cin >> p[i], g[--p[i]].push_back(i);
  for (int i = 0; i < n; i++) cin >> t[i];
  for (int i = 0; i < m; i++) cin >> q[i], q[i] = abs(q[i]) - 1;
  dfs_times(0);
  for (int l = 0; l < m; l += block) {
    int r = min(l + block, m);
    in.clear();
    for (int i = 0; i < n; i++) b[i] = 0, s[i] = 0, h[i] = -1;
    for (int i = l; i < r; i++) s[q[i]] = 1;
    virtual_tree(0);
    bruteforce_answer(0);
    for (int i = 0; i < n; i++)
      if (!on[i] && h[i] == -1 && b[i] < 0)
        for (int j = l; j < r; j++) ans[j]++;
    for (int v : in) {
      int zero = n, under = 0, tmp = b[v];
      for (int i = p[v]; i != -1 && h[i] != i; i = p[i]) {
        if (!on[i]) {
          cnt[n + b[i]]++;
          if (b[i] < 0) under++;
        }
      }
      for (int i = l; i < r; i++) {
        if (is_ancestor(v, q[i])) {
          if (on[q[i]])
            under -= cnt[--zero], tmp++;
          else
            under += cnt[zero++], tmp--;
          on[q[i]] ^= 1;
        }
        ans[i] += under + (!on[v] && tmp < 0);
      }
      for (int i = l; i < r; i++)
        if (is_ancestor(v, q[i])) on[q[i]] ^= 1;
      for (int i = p[v]; i != -1 && h[i] != i; i = p[i])
        if (!on[i]) cnt[n + b[i]]--;
    }
    for (int i = l; i < r; i++) on[q[i]] ^= 1;
  }
  for (int i = 0; i < m; i++) cout << ans[i] << (i == m - 1 ? "\n" : " ");
  return 0;
}
