#include <bits/stdc++.h>
using namespace std;
vector<int> nodos[20006];
int colorNodo[20006];
int colores[20006];
int pasos;
void bfs(int nodo) {
  queue<int> cola;
  cola.push(nodo);
  colorNodo[nodo] = colores[nodo];
  while (!cola.empty()) {
    int x = cola.front();
    cola.pop();
    for (int i = 0; i < nodos[x].size(); i++) {
      cola.push(nodos[x][i]);
      colorNodo[nodos[x][i]] = colores[nodo];
    }
  }
  pasos++;
}
int main() {
  int n, x, pos;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> pos;
    nodos[pos].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    cin >> colores[i];
  }
  for (int i = 1; i <= n; i++) {
    if (colorNodo[i] != colores[i]) bfs(i);
  }
  cout << pasos << endl;
  return 0;
}
