#include <bits/stdc++.h>
using namespace std;
class node {
  int data;
  int col;
  node *next;

 public:
  node() {
    col = 0;
    data = 0;
    next = 0;
  }
  node(int da) {
    col = 0;
    data = da;
    next = NULL;
  }
  friend class graph;
};
class graph {
  node *arr;
  int size;

 public:
  static int step;
  graph(int n) {
    size = n;
    arr = new node[size];
    for (int i = 0; i < n; i++) {
      arr[i].data = i + 1;
      arr[i].col = 0;
      arr[i].next = NULL;
    }
  }
  void draw_edge(int a, int i) {
    node *ptr = new node(a);
    ptr->next = arr[i].next;
    arr[i].next = ptr;
  }
  void input() {
    int e;
    for (int i = 1; i < size; i++) {
      cin >> e;
      draw_edge(i + 1, e - 1);
    }
  }
  void color_tree(node *temp, int col) {
    temp->col = col;
    while (temp->next != NULL) {
      temp = temp->next;
      color_tree(&arr[temp->data - 1], col);
    }
    return;
  }
  void color(int c[]) {
    for (int i = 0; i < size; i++) {
      if (arr[i].col != c[i]) {
        color_tree(&arr[i], c[i]);
        step++;
      }
    }
  }
};
int graph::step = 0;
int main() {
  int n;
  cin >> n;
  graph g(n);
  g.input();
  int c[n];
  for (int i = 0; i < n; i++) cin >> c[i];
  g.color(c);
  cout << graph::step;
  return 0;
}
