#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int maxn = 1e5 + 5;
vector<int> adj[maxn];
int t[maxn], n, q;
int In[maxn];
int sz[maxn], head[maxn], par[maxn];
void DFS(int u) {
  sz[u] = 1;
  for (int &c : adj[u]) {
    DFS(c);
    sz[u] += sz[c];
  }
  sort(adj[u].begin(), adj[u].end(),
       [&](const int x, const int y) { return sz[x] > sz[y]; });
}
void DFS1(int u) {
  static int nTime = 0;
  In[u] = ++nTime;
  if (head[u] == 0) head[u] = u;
  if (adj[u].size()) {
    head[adj[u][0]] = head[u];
  }
  for (int c : adj[u]) {
    par[c] = u;
    DFS1(c);
  }
}
int cnt[maxn];
template <int T>
int update(int *x, int len) {
  int res = 0;
  if (T > 0) {
    for (int i = 0; i < len; ++i) {
      res += x[i]-- == 0;
    }
  } else {
    for (int i = 0; i < len; ++i) {
      res += ++x[i] == 0;
    }
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen("A"
            ".INP",
            "r")) {
    freopen(
        "A"
        ".INP",
        "r", stdin);
    freopen(
        "A"
        ".OUT",
        "w", stdout);
  }
  cin >> n >> q;
  for (int i = 2; i <= n; ++i) {
    int p;
    cin >> p;
    adj[p].push_back(i);
  }
  DFS(1);
  DFS1(1);
  for (int i = 1; i <= n; ++i) {
    cin >> t[In[i]];
  }
  int res = 0;
  while (q--) {
    int u;
    cin >> u;
    if (u < 0) {
      u = -u;
      t[In[u]] -= maxn;
      res += t[In[u]] < 0;
      while (u > 0) {
        res -= update<-1>(t + In[head[u]], In[u] - In[head[u]] + 1);
        u = par[head[u]];
      }
    } else {
      res -= t[In[u]] < 0;
      t[In[u]] += maxn;
      while (u > 0) {
        res += update<1>(t + In[head[u]], In[u] - In[head[u]] + 1);
        u = par[head[u]];
      }
    }
    cout << res << ' ';
  }
}
