#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
using namespace std;
const int N = 100005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
int n, m;
vector<int> g[N];
int p[N], t[N];
int sz[N];
void dfs(int v) {
  sz[v] = 1;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    dfs(to);
    sz[v] += sz[to];
    if (sz[to] > sz[g[v][0]]) swap(g[v][0], g[v][i]);
  }
}
int tin[N], tout[N], timer;
int id[N], nxt[N];
void hld(int v) {
  tin[v] = ++timer;
  id[timer] = v;
  for (int i = 0; i < (int)g[v].size(); i++) {
    int to = g[v][i];
    if (i == 0) nxt[to] = nxt[v];
    hld(to);
  }
  tout[v] = timer;
}
int answ = 0;
bool used[N];
int mas[N];
void upd1(int l, int r) {
  for (int i = l; i <= r; i++) {
    mas[i]--;
    answ += (mas[i] == -1);
  }
}
void upd2(int l, int r) {
  for (int i = l; i <= r; i++) {
    mas[i]++;
    answ -= (mas[i] == 0);
  }
}
void update1(int v) {
  if (mas[tin[v]] < 0) --answ;
  mas[tin[v]] += inf;
  used[tin[v]] = true;
  while (nxt[v] != 1) {
    upd1(tin[nxt[v]], tin[v]);
    v = p[nxt[v]];
  }
  upd1(tin[1], tin[v]);
}
void update2(int v) {
  mas[tin[v]] -= inf;
  if (mas[tin[v]] < 0) ++answ;
  used[tin[v]] = false;
  while (nxt[v] != 1) {
    upd2(tin[nxt[v]], tin[v]);
    v = p[nxt[v]];
  }
  upd2(tin[1], tin[v]);
}
int main() {
  mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
  scanf("%d%d", &n, &m);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &p[i]);
    g[p[i]].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
  }
  dfs(1);
  iota(nxt + 1, nxt + n + 1, 1);
  hld(1);
  for (int i = 1; i <= n; i++) {
    mas[tin[i]] = t[i];
  }
  while (m--) {
    int v;
    scanf("%d", &v);
    if (v > 0)
      update1(v);
    else
      update2(-v);
    printf("%d ", answ);
  }
  cout << endl;
  return 0;
}
