#include <bits/stdc++.h>
using namespace std;
vector<int> tree[10000], visited, color;
int ans = 1;
void dfs(int x) {
  if (visited[x]) return;
  visited[x] = true;
  for (int node : tree[x]) {
    if (color[node] != color[x]) ans++;
    dfs(node);
  }
}
int solvere() {
  int n, i, x;
  cin >> n;
  visited.resize(n + 1, false), color.resize(n + 1);
  for (i = 2; i <= n; i++) {
    cin >> x;
    tree[x].push_back(i);
  }
  for (i = 1; i <= n; i++) cin >> color[i];
  dfs(1);
  cout << ans;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  while (t--) solvere();
  return 0;
}
