#include <bits/stdc++.h>
using namespace std;
int n, p, ans, c[10005];
vector<int> g[10005];
void f(int p, int q) {
  int i;
  if (c[p] != q) ans++;
  for (i = 0; i < g[p].size(); i++) {
    f(g[p][i], c[p]);
  }
}
int main() {
  int i;
  scanf("%d", &n);
  for (i = 2; i <= n; i++) {
    scanf("%d", &p);
    g[p].push_back(i);
  }
  for (i = 1; i <= n; i++) scanf("%d", &c[i]);
  f(1, 0);
  cout << ans;
  return 0;
}
