#include <bits/stdc++.h>
using namespace std;
const int si = 1e4 + 10;
long long int n, k, a[si], p, c[si];
int mark[si], t = 1;
vector<long long int> node[si];
void process(int s) {
  mark[s] = 1;
  for (auto pos : node[s]) {
    if (mark[pos] == 0) {
      mark[pos] = 1;
      if (c[pos] != c[s]) {
        t++;
      }
      process(pos);
    }
  }
}
void dfs(int start) {
  memset(mark, 0, sizeof(mark));
  process(start);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> p;
    node[i].push_back(p);
    node[p].push_back(i);
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  dfs(1);
  cout << t << endl;
}
