#include <bits/stdc++.h>
using namespace std;
vector<long long int> colors;
vector<bool> visited;
long long int ans;
void dfs(long long int s, vector<long long int> v[], long long int color = -1) {
  if (colors[s] != color) {
    ans++;
    color = colors[s];
  }
  visited[s] = true;
  for (long long int x : v[s]) {
    if (!visited[x]) {
      dfs(x, v, color);
    }
  }
}
void runcases(long long int T) {
  long long int n;
  cin >> n;
  vector<long long int> v[n];
  for (long long int i = 0; i < n - 1; i++) {
    long long int x;
    cin >> x;
    x--;
    v[x].push_back(i + 1);
  }
  colors.assign(n, 0);
  for (long long int i = 0; i < n; i++) {
    cin >> colors[i];
  }
  visited.assign(n, false);
  ans = 0;
  dfs(0, v);
  cout << ans << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int T = 1;
  for (long long int t = 1; t <= T; t++) {
    runcases(t);
  }
  return 0;
}
