#include <bits/stdc++.h>
using namespace std;
long long c[10007], color[10007], visited[10007];
vector<long long> adj[10007];
void bfs(long long s) {
  stack<long long> q;
  q.push(s);
  color[s] = c[s];
  visited[s] = s;
  while (!q.empty()) {
    long long u = q.top();
    q.pop();
    for (int i = 0; i < adj[u].size(); i++) {
      long long v = adj[u][i];
      if (visited[v] != s) {
        color[v] = color[s];
        visited[v] = s;
        q.push(v);
      }
    }
  }
}
int main() {
  long long n, i, j, k, x, u, s, v;
  long long cnt = 0;
  cin >> n;
  for (i = 2; i <= n; i++) {
    cin >> x;
    adj[x].push_back(i);
  }
  for (i = 1; i <= n; i++) cin >> c[i];
  for (i = 1; i <= n; i++) {
    if (color[i] != c[i]) {
      bfs(i);
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}
