#include <bits/stdc++.h>
using namespace std;
int tree[20001], color[20001], colored[20001] = {0};
vector<int> link[20001];
int rs = 0;
void paint(int id) {
  if (color[id] != colored[tree[id]]) rs++;
  colored[id] = color[id];
  for (int i = 0; i < link[id].size(); ++i) paint(link[id][i]);
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  tree[1] = 0;
  for (int i = 2; i < n + 1; ++i) {
    cin >> tree[i];
    link[tree[i]].push_back(i);
  }
  for (int i = 1; i < n + 1; ++i) cin >> color[i];
  paint(1);
  cout << rs;
  return 0;
}
