#include <bits/stdc++.h>
using namespace std;
void dfs(vector<vector<int>>& edges, vector<bool>& visited, int v,
         vector<int>& color, int& count, int curr_color) {
  visited[v] = true;
  if (curr_color != color[v]) {
    count++;
    curr_color = color[v];
  }
  if (!edges[v].empty()) {
    for (int i = 0; i < edges[v].size(); ++i) {
      if (!visited[edges[v][i]]) {
        dfs(edges, visited, edges[v][i], color, count, curr_color);
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<vector<int>> edges(n, vector<int>());
  int v;
  for (int i = 1; i < n; ++i) {
    cin >> v;
    v--;
    edges[i].push_back(v);
    edges[v].push_back(i);
  }
  vector<int> color(n, 0);
  for (int i = 0; i < n; ++i) {
    cin >> color[i];
  }
  vector<bool> visited(n, false);
  int count = 0;
  int curr_color = -1;
  dfs(edges, visited, 0, color, count, curr_color);
  cout << count;
  return 0;
}
