You are given a rooted tree with *n* vertices. The vertices are numbered from 1 to *n*, the root is the vertex number 1.

Each vertex has a color, let's denote the color of vertex *v* by *c*<sub class="lower-index">*v*</sub>. Initially *c*<sub class="lower-index">*v*</sub> = 0.

You have to color the tree into the given colors using the smallest possible number of steps. On each step you can choose a vertex *v* and a color *x*, and then color all vectices in the subtree of *v* (including *v* itself) in color *x*. In other words, for every vertex *u*, such that the path from root to *u* passes through *v*, set *c*<sub class="lower-index">*u*</sub> = *x*.

It is guaranteed that you have to color each vertex in a color different from 0.

You can learn what a rooted tree is using the link: [https://en.wikipedia.org/wiki/Tree_(graph_theory)](https://en.wikipedia.org/wiki/Tree_(graph_theory)).
The first line contains a single integer *n* (2 ≤ *n* ≤ 10<sup class="upper-index">4</sup>) — the number of vertices in the tree.

The second line contains *n* - 1 integers *p*<sub class="lower-index">2</sub>, *p*<sub class="lower-index">3</sub>, ..., *p*<sub class="lower-index">*n*</sub> (1 ≤ *p*<sub class="lower-index">*i*</sub> &lt; *i*), where *p*<sub class="lower-index">*i*</sub> means that there is an edge between vertices *i* and *p*<sub class="lower-index">*i*</sub>.

The third line contains *n* integers *c*<sub class="lower-index">1</sub>, *c*<sub class="lower-index">2</sub>, ..., *c*<sub class="lower-index">*n*</sub> (1 ≤ *c*<sub class="lower-index">*i*</sub> ≤ *n*), where *c*<sub class="lower-index">*i*</sub> is the color you should color the *i*-th vertex into.

It is guaranteed that the given graph is a tree.
The tree from the first sample is shown on the picture (numbers are vetices' indices):

<img class="tex-graphics" src="https://espresso.codeforces.com/10324ccdc37f95343acc4f3c6050d8c334334ffa.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On first step we color all vertices in the subtree of vertex 1 into color 2 (numbers are colors):

<img class="tex-graphics" src="https://espresso.codeforces.com/1c7bb267e2c1a006132248a43121400189309e2f.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On seond step we color all vertices in the subtree of vertex 5 into color 1:

<img class="tex-graphics" src="https://espresso.codeforces.com/2201a6d49b89ba850ff0d0bdcbb3f8e9dd3871a8.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On third step we color all vertices in the subtree of vertex 2 into color 1:

<img class="tex-graphics" src="https://espresso.codeforces.com/6fa977fcdebdde94c47695151e0427b33d0102c5.png" style="max-width: 100.0%;max-height: 100.0%;"/>

The tree from the second sample is shown on the picture (numbers are vetices' indices):

<img class="tex-graphics" src="https://espresso.codeforces.com/d70f9ae72a2ed429dd6531cac757e375dd3c953d.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On first step we color all vertices in the subtree of vertex 1 into color 3 (numbers are colors):

<img class="tex-graphics" src="https://espresso.codeforces.com/7289e8895d0dd56c47b6b17969b9cf77b36786b5.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On second step we color all vertices in the subtree of vertex 3 into color 1:

<img class="tex-graphics" src="https://espresso.codeforces.com/819001df7229138db3a407713744d1e3be88b64e.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On third step we color all vertices in the subtree of vertex 6 into color 2:

<img class="tex-graphics" src="https://espresso.codeforces.com/80ebbd870a0a339636a21b9acdaf9de046458b43.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On fourth step we color all vertices in the subtree of vertex 4 into color 1:

<img class="tex-graphics" src="https://espresso.codeforces.com/ed836aa723ac0176abde4e32988e3ac205014e93.png" style="max-width: 100.0%;max-height: 100.0%;"/>

On fith step we color all vertices in the subtree of vertex 7 into color 3:

<img class="tex-graphics" src="https://espresso.codeforces.com/8132909e11b41c27b8df2f0b0c10bc841f35e58a.png" style="max-width: 100.0%;max-height: 100.0%;"/>
6
1 2 2 1 5
2 1 1 1 1 1
3
7
1 1 2 3 1 4
3 3 1 1 1 2 3
5
2
1
2 2
1
3
1 1
2 2 2
1
4
1 2 1
1 2 3 4
4
4
1 2 3
4 1 2 4
4
5
1 2 1 4
1 1 1 2 2
2
3
1 2
2 1 1
2
4
1 1 1
3 1 3 1
3
4
1 1 2
4 1 4 1
2
4
1 2 2
3 1 2 3
4
3
1 1
1 2 2
3
n = int(input())
p = [int(a) for a in input().split()]
c = [int(a) for a in input().split()]
N = 1
for i in range(n-1):
    if c[i+1] != c[p[i]-1]:
        N += 1
print(N)
