#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
inline int getint() {
  int x;
  scanf("%d", &x);
  return x;
}
inline long long getlng() {
  long long x;
  scanf("%lld", &x);
  return x;
}
int dx4[] = {-1, 0, 1, 0};
int dy4[] = {0, 1, 0, -1};
int dx8[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy8[] = {-1, 0, 1, -1, 1, -1, 0, 1};
const double eps = (double)1e-9;
int n, ans = 0;
vector<int> tree[10005];
int C[10005], to[10005];
bool vis[10005];
void dfs(int u, int parcol) {
  to[u] = parcol;
  if (to[u] != C[u]) {
    ++ans;
    to[u] = C[u];
  }
  parcol = C[u];
  vis[u] = true;
  for (const auto& v : tree[u]) {
    if (!vis[v]) {
      dfs(v, parcol);
    }
  }
}
int main() {
  memset((to), (-1), sizeof(to));
  ;
  n = getint();
  for (int i = 2; i <= n; ++i) {
    int p = getint();
    tree[p].push_back(i);
    tree[i].push_back(p);
  }
  for (int i = 1; i <= n; ++i) {
    C[i] = getint();
  }
  dfs(1, C[1]);
  cout << ans + 1 << '\n';
  return 0;
}
