func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 1e18;   long long my_pow(long long a, long long n) {     long long res = 1;     while (n) {       if (n & 1) res *= a;       a *= a;       n >>= 1;     }     return res;   }   const int mn = 10010;   vector<int> v[mn];   vector<int> s(mn, 0);   void dfs(int vert, int c) {     s[vert] = c;     for (auto it : v[vert]) dfs(it, c);   }   int main() {     int n, k;     cin >> n;     int c[n + 10];     for (int i = 2; i <= n; i++) {       scanf( %d , &k);       v[k].push_back(i);     }     for (int i = 1; i <= n; i++) scanf( %d , &c[i]);     int ans = 0;     for (int i = 1; i <= n; i++) {       if (s[i] != c[i]) {         dfs(i, c[i]);         ans++;       }     }     cout << ans;     return 0;   }   