#include <bits/stdc++.h>
using namespace std;
int n, p[10010];
int c[10010];
vector<int> adj[10010];
int dfs(int u, int ci) {
  int ans = 0;
  if (ci != c[u]) {
    ci = c[u];
    ans++;
  }
  for (int i = 0; i < adj[u].size(); i++) ans += dfs(adj[u][i], ci);
  return ans;
}
int main() {
  int n;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> p[i];
    adj[p[i]].push_back(i);
  }
  for (int i = 1; i <= n; i++) cin >> c[i];
  cout << dfs(1, 0) << '\n';
  return 0;
}
