#include <bits/stdc++.h>
using namespace std;
long long col[1000005];
long long c[1000005];
vector<long long> G[100005];
long long ans = 0;
void dfs2(long long node, long long parent, long long color) {
  long long i;
  for (i = 0; i < G[node].size(); i++) {
    if (G[node][i] != parent) {
      col[G[node][i]] = color;
      dfs2(G[node][i], node, color);
    }
  }
}
void dfs1(long long node, long long parent) {
  long long i, color;
  color = c[node];
  if (col[node] != c[node]) {
    dfs2(node, parent, color);
    ans++;
  }
  for (i = 0; i < G[node].size(); i++) {
    if (G[node][i] != parent) {
      dfs1(G[node][i], node);
    }
  }
}
int main() {
  long long n, i, u;
  cin >> n;
  for (i = 2; i <= n; i++) {
    cin >> u;
    G[i].push_back(u);
    G[u].push_back(i);
  }
  for (i = 1; i <= n; i++) {
    cin >> c[i];
  }
  dfs1(1, 1);
  cout << ans << "\n";
  return 0;
}
