#include <bits/stdc++.h>
using namespace std;
int cols[10000], b[100000], cnt = 0;
vector<vector<int> > a;
void col(int s, int c) {
  cols[s] = c;
  for (int k : a[s]) {
    col(k, c);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  a.resize(n);
  memset(cols, 0, sizeof(cols));
  for (int i = 1; i < n; i++) {
    int c;
    cin >> c;
    a[c - 1].push_back(i);
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  queue<int> q;
  q.push(0);
  while (!q.empty()) {
    int c = q.front();
    q.pop();
    if (cols[c] != b[c]) {
      col(c, b[c]);
      cnt++;
    }
    for (int k : a[c]) q.push(k);
  }
  cout << cnt << "\n";
}
