#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) {
  if (a <= b) return a;
  return b;
}
int max(int a, int b) {
  if (a >= b) return a;
  return b;
}
void dfs(int n, vector<vector<int>>& gr, vector<int>& colors, vector<int>& used,
         int v) {
  stack<int> s;
  s.push(v);
  used[v] = colors[v];
  while (!s.empty()) {
    auto u = s.top();
    s.pop();
    for (auto w : gr[u]) {
      s.push(w);
      used[w] = used[u];
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<vector<int>> gr(n);
  for (int i = 1; i < n; ++i) {
    int x;
    cin >> x;
    gr[x - 1].push_back(i);
  }
  vector<int> colors(n);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    colors[i] = x;
  }
  vector<int> used(n, 0);
  int steps = 0;
  for (int i = 0; i < n; ++i) {
    if (colors[i] != used[i]) {
      dfs(n, gr, colors, used, i);
      steps++;
    }
  }
  cout << steps;
}
