#include <bits/stdc++.h>
using namespace std;
int color[100005], color1[100005];
vector<int> v[100005];
int dp[100005];
int c = 0;
void dfs(int s, int par) {
  int i;
  if (color[s] != color1[s]) {
    c++;
    color1[s] = color[s];
  }
  for (i = 0; i < v[s].size(); i++) {
    if (v[s][i] == par) continue;
    color1[v[s][i]] = color[s];
    dfs(v[s][i], s);
  }
}
int main() {
  int n, i, a;
  cin >> n;
  for (i = 2; i <= n; i++) {
    cin >> a;
    v[a].push_back(i);
    v[i].push_back(a);
  }
  for (i = 1; i <= n; i++) {
    color1[i] = 0;
    cin >> color[i];
  }
  dfs(1, -1);
  cout << c << endl;
}
