#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > dsk;
vector<int> color, mau;
int kq = 1;
void BFS() {
  queue<int> q;
  q.push(1);
  mau[1] = color[1];
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 0; i < dsk[u].size(); i++) {
      int v = dsk[u][i];
      if (mau[v] == 0) {
        if (color[v] != mau[u]) {
          mau[v] = color[v];
          kq++;
        } else
          mau[v] = color[v];
        q.push(v);
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  dsk.assign(n + 1, vector<int>());
  mau.assign(n + 1, 0);
  color.assign(n + 1, 0);
  for (int i = 2; i <= n; i++) {
    int x;
    cin >> x;
    dsk[i].push_back(x);
    dsk[x].push_back(i);
  }
  for (int i = 1; i <= n; i++) cin >> color[i];
  BFS();
  cout << kq;
}
