#include <bits/stdc++.h>
using namespace std;
const int Max_N = 1E6 + 10;
int n, m, ans = 1, p[Max_N], color[Max_N];
vector<int> chil[Max_N];
bool mark[Max_N];
int dfs(int i) {
  int res = 0;
  mark[i] = true;
  for (int u : chil[i])
    if (!mark[u] && color[i] != color[u]) ++res;
  return res;
}
int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> p[i];
    p[i]--;
    chil[p[i]].push_back(i);
  }
  for (int i = 0; i < n; i++) cin >> color[i];
  for (int i = 0; i < n; i++)
    if (!mark[i]) ans += dfs(i);
  cout << ans;
}
