#include <bits/stdc++.h>
const int oo = 2139063143;
const int N = 100010;
const int P = 1000000007;
using namespace std;
template <typename T>
inline void sc(T &x) {
  x = 0;
  static int p;
  p = 1;
  static char c;
  c = getchar();
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c - 48);
    c = getchar();
  }
  x *= p;
}
template <typename T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void pr(T x) {
  print(x), putchar(' ');
}
struct EDGE {
  int v, nx;
} lb[N];
int tot = 1, top[N];
void add(int u, int v) { lb[++tot] = (EDGE){v, top[u]}, top[u] = tot; }
int faa[N], son[N], siz[N], dep[N];
void dfs0(int u, int fa) {
  dep[u] = dep[faa[u] = fa] + (siz[u] = 1);
  for (int kb = top[u]; kb; kb = lb[kb].nx) {
    int v = lb[kb].v;
    dfs0(v, u);
    siz[u] += siz[v];
    if (siz[v] > siz[son[u]]) son[u] = v;
  }
}
int topf[N], dfn[N], ddd[N];
void dfs00(int u, int topf) {
  ::topf[u] = topf;
  ddd[dfn[u] = ++dfn[0]] = u;
  if (son[u]) dfs00(son[u], topf);
  for (int kb = top[u]; kb; kb = lb[kb].nx) {
    int v = lb[kb].v;
    if (v == son[u]) continue;
    dfs00(v, v);
  }
}
const int B = 500, M = N / B + 10, G = 100000;
struct BLO {
  int s[N << 1], d;
} c[M];
int a[N], b[N], ans = 0;
void addblo(int p, int d) {
  if (d == -1) ans -= c[p].s[-c[p].d + G + 1];
  c[p].d += d;
  if (d == 1) ans += c[p].s[-c[p].d + G + 1];
}
void addpos(int p, int d) {
  ans -= a[p] + c[b[p]].d > G;
  if (a[p] >= 0) --c[b[p]].s[a[p]];
  a[p] += d;
  ans += a[p] + c[b[p]].d > G;
  if (a[p] >= 0) ++c[b[p]].s[a[p]];
}
void change0(int l, int r, int d) {
  int bl = b[l], br = b[r];
  if (bl == br) {
    for (int i = l; i <= r; i++) addpos(i, d);
    return;
  }
  while (b[l] == bl) addpos(l, d), ++l;
  while (b[r] == br) addpos(r, d), --r;
  for (int i = b[l]; i <= b[r]; i++) addblo(i, d);
}
int sgn(int x) { return x > 0 ? 1 : (x < 0 ? -1 : 0); }
void change(int x, int d) {
  while (x) {
    change0(dfn[topf[x]], dfn[x], d);
    x = faa[topf[x]];
  }
}
int main() {
  int n, m;
  sc(n), sc(m);
  for (int i = 2; i <= n; i++) {
    int f;
    sc(f);
    add(f, i);
  }
  dfs0(1, 0);
  dfs00(1, 1);
  for (int i = 1; i <= n; i++) {
    int x;
    sc(x);
    a[dfn[i]] = -x + G;
  }
  for (int i = 1; i <= n; i++) b[i] = (i - 1) / B + 1;
  for (int i = 1; i <= n; i++) ++c[b[i]].s[a[i]];
  while (m--) {
    int x, X;
    sc(x);
    X = abs(x);
    change(X, sgn(x));
    addpos(dfn[X], x > 0 ? -G : G);
    pr(ans);
  }
  return 0;
}
