#include <bits/stdc++.h>
using namespace std;
vector<int> graph[40005];
vector<int> color(40005);
vector<int> colora(40005);
vector<int> colvis(40005, 0);
vector<bool> visited(40005, false);
int n;
int ans;
void dfs(int i, int c) {
  visited[i] = true;
  if (c != color[i]) {
    ans++;
  }
  colora[i] = color[i];
  for (int j = 0; j < graph[i].size(); j++) {
    if (!visited[graph[i][j]]) {
      dfs(graph[i][j], color[i]);
    }
  }
  colvis[color[i]]--;
}
int main() {
  int n;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    int p;
    cin >> p;
    graph[p].push_back(i);
  }
  for (int i = 0; i < n; i++) {
    cin >> color[i + 1];
  }
  dfs(1, 0);
  cout << ans;
  return 0;
}
