#include <bits/stdc++.h>
using namespace std;
const int mx = 1e4 + 5;
vector<int> g[mx], v[mx];
int color[mx], dis[mx], rong[mx], now[mx], cnt;
void dfs0(int u) {
  if (color[u]) return;
  color[u] = 1;
  for (auto it : g[u]) {
    if (!color[it]) dis[it] = dis[u] + 1;
    dfs0(it);
  }
}
void dfs(int u, int c) {
  if (color[u]) return;
  color[u] = 1;
  now[u] = c;
  for (auto it : g[u]) {
    if (dis[it] > dis[u]) dfs(it, c);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    int x;
    cin >> x;
    g[i + 1].push_back(x);
    g[x].push_back(i + 1);
  }
  for (int i = 0; i < n; i++) cin >> rong[i + 1];
  dfs0(1);
  int d = -1;
  for (int i = 1; i <= n; i++) {
    int temp = dis[i];
    v[temp].push_back(i);
    d = max(d, temp);
  }
  for (int i = 0; i < d + 1; i++) {
    for (auto it : v[i]) {
      if (now[it] != rong[it]) {
        for (int i = 1; i <= n; i++) color[i] = 0;
        dfs(it, rong[it]);
        cnt++;
      }
    }
  }
  cout << cnt << "\n";
  return 0;
}
