#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> x[10005];
bool is[10005];
int ans = 0;
int A[10005];
void bfs() {
  queue<pair<int, int> > cola;
  cola.push({1, A[1]});
  while (!cola.empty()) {
    int nx = cola.front().first;
    int color = cola.front().second;
    cola.pop();
    if (is[nx] == false) {
      is[nx] = true;
      for (int i = 0; i < (int)x[nx].size(); i++) {
        if (color != A[x[nx][i]] and is[x[nx][i]] == false) ans++;
        cola.push({x[nx][i], A[x[nx][i]]});
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    int a;
    cin >> a;
    x[i].push_back(a);
    x[a].push_back(i);
  }
  for (int i = 1; i <= n; i++) cin >> A[i];
  bfs();
  cout << ++ans << "\n";
  return 0;
}
