#include <bits/stdc++.h>
using namespace std;
int di[8] = {1, -1, 0, 0, 1, 1, -1, -1};
int dj[8] = {0, 0, 1, -1, 1, -1, 1, -1};
const long long N = 2e5 + 5, MOD = 1e9 + 7, oo = 1e18;
const double PI = 3.141592653589793238;
int n, x, ans, a[10005], c;
vector<vector<int>> adj(10005);
void dfs(int i) {
  a[i] = c;
  for (auto child : adj[i]) {
    a[child] = c;
    dfs(child);
  }
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> x;
    adj[x].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    cin >> c;
    if (a[i] != c) dfs(i), ans++;
  }
  cout << ans;
}
