#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long int N = 10007;
long long int c[N];
vector<vector<long long int> > g(N);
long long int dfs(long long int idx, long long int push = -1) {
  long long int ans = 0, same = 0;
  for (auto it : g[idx])
    if (it != push) {
      if (c[it] == c[idx]) same++;
      ans += dfs(it, idx);
    }
  ans = ans - same + 1;
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, i, j, u, v;
  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];
  cout << dfs(1) << '\n';
  return 0;
}
