A few years ago a worldwide crisis began, leaving many people in economic trouble. The workers of a certain company want to ask for a raise.
The company has a strict hierarchy: every employee has exactly one direct boss, except for the company's owner, who has no boss. An employee who is nobody's boss is called a worker. Everyone else, together with the owner, is called a boss.
To ask for a raise, a worker files a petition to their direct boss. Naturally, each boss would rather keep their subordinates content on their current pay so that the company's profit stays as high as possible. However, once at least $T$ percent of a boss's direct subordinates have filed a petition, that boss is pressured into filing a petition to their own direct boss as well. A boss files at most one petition to their own boss, no matter how many subordinates petitioned them. When computing the pressure percentage, a boss counts only their direct subordinates (both the ones who filed a petition and the ones who did not).
A boss may have both workers and lower bosses as direct subordinates at the same time, and may receive petitions from either kind. Each direct subordinate, whatever its kind, counts as $1$ when checking the pressure percentage.
When a petition finally reaches the owner of the company, every salary is raised. The workers' union is determined to make this happen, so it must convince enough workers to petition their direct boss.
Given the company hierarchy and the parameter $T$, determine the minimum number of workers who must file a petition so that the owner receives a petition.
The input contains several test cases. Each test case is given on exactly two lines.
The first line contains two integers $N$ and $T$ ($1 \le N \le 10^5$, $1 \le T \le 100$) separated by a single space. $N$ is the number of employees (not counting the owner) and $T$ is the parameter described above. Employees are identified by integers from $1$ to $N$, and the owner is identified by $0$.
The second line contains $N$ integers separated by single spaces. The $i$-th integer $B_i$ ($0 \le B_i \le i - 1$) is the identifier of the direct boss of employee $i$.
The last test case is followed by a line containing two zeros separated by a single space, which must not be processed.
For each test case, output a single line containing one integer: the minimum number of workers who must file a petition so that the owner of the company receives a petition.