#include <bits/stdc++.h>
using namespace std;
using db = long double;
using pll = pair<long long, long long>;
const db pi = acos(-1);
const long long infl = LLONG_MAX;
int col[10009], z = 0;
vector<int> p[10009];
bool vis[10009];
void dfs(int v, int c, int par = -1) {
  if (vis[v]) return;
  vis[v] = 1;
  z += (col[v] != c);
  for (int zx : p[v]) {
    if (!vis[zx]) dfs(zx, col[v], v);
  }
  return;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, i, x, j, k, n;
  cin >> n;
  for (i = 1; i < n; i += 1) {
    cin >> x;
    p[x].push_back(i + 1);
    p[i + 1].push_back(x);
  }
  for (i = 1; i < n + 1; i += 1) cin >> col[i];
  dfs(1, -1);
  cout << z << '\n';
}
