#include <bits/stdc++.h>
using namespace std;
const long long N = 1e4 + 1;
char arr[N];
long long arr1[N];
long long cnt;
vector<long long> v[N], v1[N];
vector<pair<long long, long long> > p;
void dfs(long long a, long long col) {
  arr[a] = 1;
  if (arr1[a] != col) cnt++, col = arr1[a];
  for (int i = 0; i < v1[a].size(); i++) {
    long long to = v1[a][i];
    if (!arr[to]) dfs(to, col);
  }
}
int main() {
  long long n, x;
  cin >> n;
  for (int i = 1; i < n; i++)
    cin >> x, v1[x].push_back(i + 1), v1[i + 1].push_back(x);
  for (int i = 1; i <= n; i++) cin >> arr1[i];
  dfs(1, 0);
  cout << cnt;
}
