#include <bits/stdc++.h>
using namespace std;
long long ans;
vector<long long> v[123456];
long long arr[123456];
bool vis[123456];
void dfs(long long node, long long prev) {
  vis[node] = 1;
  if (arr[node] != prev) {
    ans++;
    prev = arr[node];
  }
  for (long long i = 0; i < v[node].size(); i++) {
    if (!vis[v[node][i]]) dfs(v[node][i], prev);
  }
}
int main() {
  long long i, j;
  memset(vis, 0, sizeof vis);
  long long N;
  cin >> N;
  for (i = 2; i <= N; i++) {
    long long X;
    cin >> X;
    v[X].push_back(i);
  }
  for (i = 1; i <= N; i++) cin >> arr[i];
  dfs(1, 0);
  cout << ans;
  return 0;
}
