#include <bits/stdc++.h>
using namespace std;
int n, parent[10001], size[10001], p[10001], c[10001];
void make_set(int v) {
  parent[v] = v;
  size[v] = 1;
}
int find_set(int v) {
  if (parent[v] == v) return v;
  return parent[v] = find_set(parent[v]);
}
void union_sets(int a, int b) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    if (size[a] < size[b]) swap(a, b);
    parent[b] = a;
    size[a] += size[b];
  }
}
int main() {
  cin >> n;
  make_set(1);
  for (int i = 2; i <= n; i++) {
    cin >> p[i];
    make_set(i);
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  for (int i = 2; i <= n; i++) {
    if (c[i] == c[p[i]]) union_sets(i, p[i]);
  }
  set<int> st;
  for (int i = 1; i <= n; i++) {
    st.insert(find_set(i));
  }
  cout << st.size();
  return 0;
}
