#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 55, mod = 1e9 + 7;
vector<long long> v[N];
long long ans = -1, col[N], cc;
void dfs(long long chi, long long pa, long long d, long long f) {
  if (f) cc++;
  long long i, j = 0;
  for (i = 0; i < v[chi].size(); i++) {
    if (v[chi][i] == pa) continue;
    if (col[v[chi][i]] != d) {
      dfs(v[chi][i], chi, col[v[chi][i]], 1);
    } else {
      dfs(v[chi][i], chi, d, 0);
    }
  }
}
int main() {
  long long n, i, j, k, x, y, z, a, b, c;
  scanf("%lld", &n);
  for (i = 2; i <= n; i++) {
    scanf("%lld", &x);
    v[i].push_back(x);
    v[x].push_back(i);
  }
  for (i = 1; i <= n; i++) {
    scanf("%lld", &col[i]);
  }
  dfs(1, 0, col[1], 1);
  printf("%lld\n", cc);
}
