#include <bits/stdc++.h>
int main() {
  long long int i, j, n, aux, count = 1;
  scanf("%lld", &n);
  long long int final[n], pai[n];
  for (i = 1; i < n; i++) {
    scanf("%lld", &pai[i]);
  }
  for (i = 0; i < n; i++) {
    scanf("%lld", &final[i]);
  }
  for (i = 1; i < n; i++) {
    if (final[pai[i] - 1] != final[i]) {
      count++;
    }
  }
  printf("%lld", count);
  return 0;
}
