#include <bits/stdc++.h>
using namespace std;
int father[10016], color[10016];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &father[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &color[i]);
  int ans = 1;
  for (int i = 2; i <= n; i++)
    if (color[i] != color[father[i]]) ans++;
  printf("%d\n", ans);
  return 0;
}
