#include <bits/stdc++.h>
using namespace std;
int n;
int f[10005], c[10005];
int main() {
  while (cin >> n) {
    for (int i = 2; i <= n; i++) cin >> f[i];
    for (int i = 1; i <= n; i++) cin >> c[i];
    int ans = 1;
    for (int i = 2; i <= n; i++)
      if (c[i] != c[f[i]]) ans++;
    cout << ans << endl;
  }
  return 0;
}
