#include <bits/stdc++.h>
using namespace std;
map<int, vector<int>> g;
int c[10006];
int dfs(int v, int p) {
  int h = 1;
  for (int i = 0; i < g[v].size(); i++) {
    if (g[v][i] == p) {
      continue;
    }
    if (c[g[v][i]] != c[v]) {
      h += dfs(g[v][i], v);
    } else {
      h += dfs(g[v][i], v) - 1;
    }
  }
  return h;
}
int main() {
  int n;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    int a;
    cin >> a;
    g[a].push_back(i);
    g[i].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
  }
  cout << dfs(1, 0);
}
