#include <bits/stdc++.h>
using namespace std;
bool visited[10005];
vector<int> adj[10005];
int color[10005];
int col[10005] = {0};
int steps = 0;
void dfs(long long i, long long colour) {
  visited[i] = true;
  col[i] = colour;
  vector<int>::iterator it;
  for (it = adj[i].begin(); it != adj[i].end(); it++) {
    if (!visited[*it]) {
      dfs(*it, colour);
    }
  }
}
int main() {
  long long n;
  cin >> n;
  for (long long i = 2; i <= n; i++) {
    long long x;
    cin >> x;
    adj[x].push_back(i);
  }
  for (long long i = 1; i <= n; i++) cin >> color[i];
  for (long long i = 1; i <= n; i++) {
    if (color[i] != col[i]) {
      steps++;
      dfs(i, color[i]);
      for (int j = i + 1; j <= n; j++) visited[j] = false;
    }
  }
  cout << steps;
  return 0;
}
