#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
 
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
 
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
 
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define trav(a,x) for (auto& a : x)
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)
 
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define ins insert

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 100001; //check the limits, dummy

vector<vi> graph(MX);

pi dfs(int v) {
    int sumPos = 0, sumNeg = 0;
    vi odds;
    int cnt = 1;
    trav(a, graph[v]) {
        pi cur = dfs(a);
        if (cur.s) {
            cnt = 1 - cnt;
            odds.pb(cur.f);
        } else {
            if (cur.f > 0) {
                sumPos += cur.f;
            } else sumNeg += cur.f;
        }
    }
    sort(all(odds)); 
    int ans = 1;
    ans += sumNeg;
    F0R(i, sz(odds)) {
        if (i % 2) {
            ans -= odds[i];
        } else {
            ans += odds[i];
        }
    }
    if (sz(odds) % 2) {
        ans -= sumPos;
    } else {
        ans += sumPos;
    }
    //cout << v << " " << ans << " " << cnt << nl;
    return {ans, cnt};
}

void solve() {

    int N; cin >> N;
    FOR(i, 1, N) {
        int X; cin >> X; X--; graph[X].pb(i);
    }

    cout << (dfs(0).f+N)/2 << nl;

}
 
int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);    

    int T = 1;
//    cin >> T;
    while(T--) {
        solve();
    }

	return 0;
}
#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
*/
using namespace std;
/*
typedef tree<int,null_type, less<int>,rb_tree_tag,
        tree_order_statistics_node_update> indexed_set;
*/
#define pb push_back
#define ll long long
#define x1 first
#define y1 second
#define frb(i,a,b) for(ll (i)=(a);(i) <= (b); (i)+=(i)&-(i))
#define rfrb(i,a) for(ll (i)=(a);(i) > 0;(i)-=(i)&-(i))
#define fr(i,a,b) for(ll (i) = (a); (i) <= (b); (i)++)
#define rep(i,c) for(auto (i) : (c))
#define mini(a,b) (((a) < (b)) ? (a) : (b))
#define maxi(a,b) (((a) > (b)) ? (a) : (b))
#define par pair<ll,ll>
#define vp vector<par>
#define vi vector<ll>
#define dq deque<ll>
//indexed_set s;
///siempre ver las propiedades que se cumplen en los problemas    
///always see the properties of the problems
///siempre poner "\n" como endl
///----------------------------------------------------------------------------

const ll mod = 1e9+7;
ll n,t;

struct b_s{

    bool good(ll m){
        ///verify if m is good
        double num = (100+t)* m / 100;
        return num - m - n >= 0.0;
    }
    ///every monotony sequence
    ll bin_sr3(ll l,ll r){
        while(r > l+1){
            ll m = (l+r)>>1;
            if(good(m))r = m;
            else l = m;
        }
        return r;
    }

}bs;
     
int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);
    cout.setf(ios::fixed);cout.precision(0);
    ///freopen("a.in","r",stdin);
    ///freopen("a.out","w",stdout);
    cin>>t>>n;
    ll num = bs.bin_sr3(1,n*200)+n-1;
    cout<<num<<"\n";
    
    return 0;
}