#include <bits/stdc++.h>
using namespace std;
struct Node {
  bool visited;
  int curColor;
  int color;
  int num;
  vector<Node*> friends;
  Node(int num) {
    this->num = num;
    color = 0;
    curColor = 0;
    visited = 0;
  }
};
int cnt = 0;
stack<Node*> st;
void traverse(Node* node) {
  node->visited = 1;
  st.push(node);
  while (st.size()) {
    Node* temp = st.top();
    st.pop();
    if (temp->curColor != temp->color) {
      temp->curColor = temp->color;
      for (int i = 0; i < temp->friends.size(); i++) {
        temp->friends[i]->curColor = temp->color;
        if (!temp->friends[i]->visited) {
          temp->friends[i]->visited = 1;
          st.push(temp->friends[i]);
        }
      }
      cnt++;
    } else
      for (int i = 0; i < temp->friends.size(); i++) {
        temp->friends[i]->curColor = temp->color;
        if (!temp->friends[i]->visited) {
          temp->friends[i]->visited = 1;
          st.push(temp->friends[i]);
        }
      }
  }
}
int main() {
  int n;
  cin >> n;
  Node** nodes = new Node*[n + 1];
  for (int i = 1; i <= n; i++) nodes[i] = new Node(i);
  for (int i = 2; i <= n; i++) {
    int p;
    cin >> p;
    nodes[i]->friends.push_back(nodes[p]);
    nodes[p]->friends.push_back(nodes[i]);
  }
  for (int i = 1; i <= n; i++) {
    int c;
    cin >> c;
    nodes[i]->color = c;
  }
  for (int i = 1; i <= n; i++)
    if (!nodes[i]->visited) traverse(nodes[i]);
  cout << cnt;
  for (int i = 1; i <= n; i++) delete nodes[i];
  return 0;
}
