#include <bits/stdc++.h>
using namespace std;
int n, m, fa[100005], to[100005], ont[100005], pv[100005], opt[100005],
    ar[100005], cl[100005], fg[100005], sm[100005];
int vis[100005], tim;
vector<int> G[100005], E[100005];
void dfs(int u) {
  for (int v : E[u]) dfs(v), sm[u] += sm[v];
  if (!ont[u]) pv[u] += sm[u];
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (2), LIM = (n); i <= LIM; i++)
    scanf("%d", &fa[i]), E[fa[i]].push_back(i);
  for (int i = (1), LIM = (n); i <= LIM; i++) scanf("%d", &pv[i]);
  for (int i = (1), LIM = (m); i <= LIM; i++) scanf("%d", &opt[i]);
  int ans = 0;
  for (int L = 1, R; L <= m; L += 355) {
    R = min(L + 355 - 1, m);
    memset(ont, 0, sizeof ont);
    memset(sm, 0, sizeof sm);
    ar[0] = 0;
    vis[1] = ++tim, ont[1] = 1, ar[++ar[0]] = 1;
    for (int j = (L), LIM = (R); j <= LIM; j++) {
      int u = abs(opt[j]);
      if (!ont[u]) ont[u] = 1, ar[++ar[0]] = u;
      for (; vis[u] != tim; u = fa[u]) vis[u] = tim;
      if (!ont[u]) ont[u] = 1, ar[++ar[0]] = u;
    }
    for (int j = (1), LIM = (ar[0]); j <= LIM; j++) {
      int u = ar[j];
      G[u].clear();
      G[u].resize((355 + 5) << 1);
      fg[u] = (355 + 5);
      for (u = fa[u]; u && !ont[u]; u = fa[u])
        if (cl[u] == 0 && abs(pv[u]) <= 355) G[ar[j]][(355 + 5) + pv[u]]++;
      to[ar[j]] = u;
    }
    for (int j = (L), LIM = (R); j <= LIM; j++) {
      int u = abs(opt[j]), tp = opt[j] / u;
      sm[u] -= tp;
      for (; u; u = to[u]) {
        if (tp == 1)
          ans += G[u][fg[u]++];
        else
          ans -= G[u][--fg[u]];
        ans -= (cl[u] == 0 && pv[u] < 0);
        if (u == abs(opt[j])) cl[u] ^= 1;
        pv[u] -= tp;
        ans += (cl[u] == 0 && pv[u] < 0);
      }
      printf("%d%c", ans, " \n"[j == m]);
    }
    dfs(1);
  }
}
