#include <bits/stdc++.h>
using namespace std;
vector<int> G[100100];
int vis[100100], c[700][700], tp, tp2, tg[100100], f[100100];
int d[100100], ans, fa2[100100], ti[100100], a[100100], e[100100], n,
    fa[100100];
int top[100100], dfn[100100], tim, dep[100100], b[100100], son[100100], m;
void dfs(int u) {
  for (auto p : G[u]) dfs(p), f[u] += f[p];
  if (!vis[u]) ans += f[u] > ti[u];
}
int pre(int u) {
  int s, mxsize = 0, sz = 1;
  for (auto p : G[u]) {
    s = pre(p), sz += s;
    if (mxsize < s) mxsize = s, son[u] = p;
  }
  return sz;
}
void pre2(int u, int tp) {
  dep[u] = dep[fa[u]] + 1;
  top[u] = tp, dfn[u] = ++tim;
  if (son[u]) pre2(son[u], tp);
  for (auto p : G[u])
    if (p != son[u]) pre2(p, p);
}
int lca(int u, int v) {
  while (top[u] != top[v])
    dep[top[u]] < dep[top[v]] ? v = fa[top[v]] : u = fa[top[u]];
  return dep[u] < dep[v] ? u : v;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 2; i <= n; ++i) scanf("%d", &fa[i]), G[fa[i]].push_back(i);
  for (int i = 1; i <= n; ++i) scanf("%d", &ti[i]);
  for (int i = 1; i <= m; ++i) scanf("%d", &a[i]);
  pre(1), pre2(1, 1);
  int blk = (int)sqrt(m) + 1;
  for (int i = 0; i <= m / blk; ++i) {
    int L = i * blk + 1, R = min(m, (i + 1) * blk);
    for (int j = 1; j <= n; ++j) f[j] = tg[j] = vis[j] = 0;
    ans = tp = tp2 = 0;
    for (int j = 1; j < L; ++j) {
      vis[abs(a[j])] ^= 1;
      f[abs(a[j])] += (a[j] > 0 ? 1 : -1);
    }
    dfs(1);
    for (int j = L; j <= R; ++j) b[++tp] = abs(a[j]);
    sort(b + 1, b + tp + 1, [](int x, int y) { return dfn[x] < dfn[y]; });
    for (int j = 1, k = tp; j < k; ++j) b[++tp] = lca(b[j], b[j + 1]);
    sort(b + 1, b + tp + 1, [](int x, int y) { return dfn[x] < dfn[y]; });
    static int sta[100100];
    int id = 0;
    for (int j = 1, lst = 0; j <= tp; ++j)
      if (lst != b[j] || j == 1) {
        while (tp2 && lca(sta[tp2], b[j]) != sta[tp2]) tp2--;
        if (tp2)
          fa2[b[j]] = sta[tp2];
        else
          fa2[b[j]] = 0;
        sta[++tp2] = b[j], tg[b[j]] = 1, d[lst = b[j]] = ++id, b[id] = lst;
      }
    for (int j = 1; j <= id; ++j) {
      e[j] = 0;
      for (int k = -blk; k <= blk; ++k) c[j][k + blk] = 0;
    }
    for (int j = 1; j <= id; ++j) {
      for (int k = fa[b[j]]; k && !tg[k]; k = fa[k])
        if (abs(f[k] - ti[k] - 1) <= blk && !vis[k])
          c[j][f[k] - ti[k] - 1 + blk]++;
      for (int k = blk - 1; k >= -blk; --k) c[j][k + blk] += c[j][k + blk + 1];
    }
    for (int j = L; j <= R; ++j) {
      int x = abs(a[j]), dta = a[j] > 0 ? 1 : -1;
      for (; x; x = fa2[x]) {
        ans -= vis[x] == 0 && f[x] > ti[x];
        f[x] += dta, vis[x] ^= x == abs(a[j]) ? 1 : 0;
        ans += vis[x] == 0 && f[x] > ti[x];
        ans -= c[d[x]][-e[d[x]] + blk];
        e[d[x]] += dta;
        ans += c[d[x]][-e[d[x]] + blk];
      }
      printf("%d ", ans);
    }
  }
}
