#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 1;
const int M = 2e5 + 5;
const double inf = 1e9 + 0.0;
int n, m, k, cnt;
long long a[N], b[N], p[N];
vector<long long> v[N];
void dfs(long long tr, long long g) {
  p[g] = b[tr];
  for (int i = 0; i < (int)v[g].size(); i++) {
    long long to = v[g][i];
    dfs(tr, to);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> a[i];
    v[a[i]].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
  }
  for (int i = 1; i <= n; i++) {
    if (p[i] != b[i]) {
      dfs(i, i);
      cnt++;
    }
  }
  cout << cnt;
  return 0;
}
