#include <bits/stdc++.h>
using namespace std;
vector<long long> v[10009];
long long p[10009];
long long vis[10009];
long long col[10009];
long long c = 0;
void bfs() {
  memset(vis, 0, sizeof vis);
  vis[1] = col[1];
  c++;
  queue<long long> q;
  q.push(1);
  while (!q.empty()) {
    long long top = q.front();
    q.pop();
    for (int k = 0; k < v[top].size(); k++) {
      long long u = v[top][k];
      if (vis[u] == 0) {
        vis[u] = col[u];
        if (col[u] != col[top]) {
          c++;
        }
        q.push(u);
      }
    }
  }
}
int main() {
  long long n;
  cin >> n;
  for (long long i = 2; i <= n; i++) {
    long long a;
    scanf("%lld", &a);
    v[i].push_back(a);
    v[a].push_back(i);
  }
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &col[i]);
  }
  bfs();
  cout << c << endl;
  return 0;
}
