#include <bits/stdc++.h>
using namespace std;
const double eps = 1.0e-8;
const int maxn = 1e6 + 10;
const int maxm = 300;
const int turn[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
long long mod = 1e9 + 7;
vector<int> tree[10005];
int ans[10005];
int anser = 0;
void dfs(int x, int pre, int c) {
  int cur = c;
  if (c != ans[x]) {
    anser++, cur = ans[x];
  }
  int len = tree[x].size();
  for (int i = 0; i < len; i++) {
    int to = tree[x][i];
    if (to == pre) {
      continue;
    }
    dfs(to, x, cur);
  }
}
int main() {
  int n;
  int now;
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> now;
    tree[now].push_back(i);
    tree[i].push_back(now);
  }
  for (int i = 1; i <= n; i++) {
    cin >> ans[i];
  }
  dfs(1, 0, 0);
  cout << anser << endl;
}
