#include <bits/stdc++.h>
using namespace std;
int n, m, cont, dis[10000];
void BFS(int node) {
  queue<int> q;
  q.push(node);
  while (!q.empty()) {
    int p = q.front();
    q.pop();
    if (p == n) {
      cout << dis[p] << endl;
      return;
    } else {
      if (dis[p + 1] == 0) {
        q.push(p + 1);
        dis[p + 1] = dis[p] + 1;
      }
      if (dis[p / 2] == 0 && p % 2 == 0) {
        q.push(p / 2);
        dis[p / 2] = dis[p] + 1;
      }
    }
  }
}
vector<vector<int> > v(100000 + 1);
int count1 = 0;
int col[100000 + 1];
void DFS(int nd, int ch) {
  if (col[nd] != col[ch]) count1++;
  for (int i = 0; i < v[nd].size(); i++) DFS(v[nd][i], nd);
}
int main() {
  int n, k = 2;
  cin >> n;
  for (int i = 0; i < n - 1; i++) {
    cin >> m;
    v[m].push_back(k);
    k++;
  }
  for (int i = 1; i <= n; i++) {
    cin >> col[i];
  }
  DFS(1, 0);
  cout << count1 << endl;
}
