#include <bits/stdc++.h>
using namespace std;
inline void proc_status() {
  ifstream t("/proc/self/status");
  cerr << string(istreambuf_iterator<char>(t), istreambuf_iterator<char>())
       << endl;
}
template <class T>
inline T read() {
  register char c;
  register T x(0), f(1);
  while (!isdigit(c = getchar()))
    if (c == '-') f = -1;
  while (x = (x << 1) + (x << 3) + (c xor 48), isdigit(c = getchar()))
    ;
  return x * f;
}
template <typename T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const int maxN = 1e5;
int n, m;
vector<int> ver[maxN + 2];
int fa[maxN + 2];
int f[maxN + 2][19], dfn[maxN + 2], dfst, dep[maxN + 2];
void get_f(int u) {
  dfn[u] = ++dfst;
  f[u][0] = fa[u];
  dep[u] = dep[fa[u]] + 1;
  for (int i = 1; i <= 18; ++i) f[u][i] = f[f[u][i - 1]][i - 1];
  for (int v : ver[u])
    if (v != fa[u]) get_f(v);
}
int get_lca(int u, int v) {
  if (dep[u] < dep[v]) swap(u, v);
  for (int i = 18; ~i; --i)
    if (dep[f[u][i]] >= dep[v]) u = f[u][i];
  if (u == v) return u;
  for (int i = 18; ~i; --i)
    if (f[u][i] != f[v][i]) u = f[u][i], v = f[v][i];
  return f[u][0];
}
bool cmp_dfn(int x, int y) { return dfn[x] < dfn[y]; }
namespace v_tree {
int stk[maxN + 2], top;
bool mark[maxN + 2];
vector<int> p, V;
int fa[maxN + 2];
void clear() {
  for (int u : V) fa[u] = 0, mark[u] = 0;
  p.clear(), V.clear();
}
void add_point(int u) { p.push_back(u); }
void link(int u, int v) {
  fa[u] = v;
  V.push_back(v);
  V.push_back(u);
  mark[u] = mark[v] = 1;
}
void build() {
  sort((p).begin(), (p).end());
  p.erase(unique((p).begin(), (p).end()), p.end());
  sort((p).begin(), (p).end(), cmp_dfn);
  stk[top = 1] = 1;
  for (int i = 0; i < ((int)p.size()); ++i) {
    if (p[i] == 1) continue;
    int lca = get_lca(stk[top], p[i]);
    if (lca != stk[top]) {
      for (; dfn[stk[top - 1]] > dfn[lca]; --top) link(stk[top], stk[top - 1]);
      link(stk[top], lca);
      if (lca == stk[top - 1])
        top--;
      else
        stk[top] = lca;
    }
    stk[++top] = p[i];
  }
  for (int i = 1; i < top; ++i) link(stk[i + 1], stk[i]);
  sort((V).begin(), (V).end());
  V.erase(unique((V).begin(), (V).end()), V.end());
}
}  // namespace v_tree
int ans;
int val[maxN + 2];
int oper[maxN + 2];
int tag[maxN + 2];
int color[maxN + 2];
vector<int> w[maxN + 2];
void input() {
  n = read<int>(), m = read<int>();
  for (int i = 2; i <= n; ++i) fa[i] = read<int>(), ver[fa[i]].push_back(i);
  for (int i = 1; i <= n; ++i) val[i] = -read<int>();
  for (int i = 1; i <= m; ++i) oper[i] = read<int>();
}
const int SIZE = 600;
void work(int u) {
  if (u > 0) {
    color[u] ^= 1;
    ans -= val[u] > 0;
    val[u]++;
    for (int v = v_tree::fa[u]; v; u = v, v = v_tree::fa[v]) {
      ans += color[v] == 0 && val[v] == 0;
      val[v]++;
      int p = lower_bound((w[u]).begin(), (w[u]).end(), -tag[u]) - w[u].begin();
      if (p != ((int)w[u].size()) && w[u][p] == -tag[u])
        ans += upper_bound((w[u]).begin(), (w[u]).end(), -tag[u]) -
               w[u].begin() - p;
      tag[u]++;
    }
  } else {
    u = -u;
    color[u] ^= 1;
    val[u]--;
    ans += val[u] > 0;
    for (int v = v_tree::fa[u]; v; u = v, v = v_tree::fa[v]) {
      ans -= color[v] == 0 && val[v] == 1;
      val[v]--;
      int p =
          lower_bound((w[u]).begin(), (w[u]).end(), 1 - tag[u]) - w[u].begin();
      if (p != ((int)w[u].size()) && w[u][p] == 1 - tag[u])
        ans -= upper_bound((w[u]).begin(), (w[u]).end(), 1 - tag[u]) -
               w[u].begin() - p;
      tag[u]--;
    }
  }
}
void solve() {
  get_f(1);
  for (int i = 1; i <= m; i += SIZE) {
    int top = min(i + SIZE, m + 1) - 1;
    for (int j = i; j <= top; ++j) v_tree::add_point(abs(oper[j]));
    v_tree::build();
    for (int u : v_tree::V) {
      if (u == 1 || v_tree::mark[fa[u]]) continue;
      for (int v = fa[u]; !v_tree::mark[v]; v = fa[v])
        if (color[v] == 0) w[u].push_back(val[v]);
      sort((w[u]).begin(), (w[u]).end());
    }
    for (int j = i; j <= top; ++j) {
      work(oper[j]);
      printf("%d ", ans);
    }
    for (int u : v_tree::V) {
      if (u == 1 || v_tree::mark[fa[u]]) continue;
      for (int v = fa[u]; !v_tree::mark[v]; v = fa[v]) val[v] += tag[u];
    }
    for (int u : v_tree::V) w[u].clear(), tag[u] = 0;
    v_tree::clear();
  }
}
int main() {
  input();
  solve();
  return 0;
}
