#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 50;
vector<int> g[N];
int clr[N];
int n, cnt;
void dfs(int u, int par) {
  if (clr[u] != clr[par]) cnt++;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (par == v) continue;
    dfs(v, u);
  }
}
int main() {
  cin >> n;
  for (int i = 2, x; i <= n; i++) {
    cin >> x;
    g[i].push_back(x);
    g[x].push_back(i);
  }
  for (int i = 1, x; i <= n; i++) {
    cin >> x;
    clr[i] = x;
  }
  dfs(1, 1);
  cout << cnt + 1 << endl;
}
