#include <bits/stdc++.h>
using namespace std;
vector<int> g[10010];
queue<int> q;
int main(void) {
  int n, i, p, c[10010], s[10010], color, v, ans = 0;
  fill(s, s + 10010, 0);
  cin >> n;
  for (i = 1; i < n; i++) {
    cin >> p;
    p--;
    g[p].push_back(i);
  }
  for (i = 0; i < n; i++) {
    cin >> c[i];
  }
  q.push(0);
  while (!q.empty()) {
    v = q.front();
    q.pop();
    if (s[v] != c[v]) {
      ans++;
      s[v] = c[v];
    }
    if (g[v].empty()) {
      continue;
    }
    for (i = (g[v].size() - 1); i >= 0; i--) {
      s[g[v][i]] = c[v];
      q.push(g[v][i]);
    }
  }
  cout << ans << endl;
  return 0;
}
