#abc228b. [abc228_b]Takahashi's Secret
[abc228_b]Takahashi's Secret
Problem Statement
Takahashi has friends. They have nicknames: Friend , Friend , , Friend .
One day, Takahashi accidentally let one of his friends, Friend , learn his shameful secret.
For each , when Friend learns the secret, he/she will share it with Friend , if Friend has not already learned it.
How many of Takahashi's friends will learn the secret in the end?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
4 2
3 1 1 2
Sample Output 1
3
Takahashi's secret will be learned by Friend , Friend , and Friend , as follows.
- One day, Takahashi let Friend learn the secret.
- Friend shares it with Friend .
- Friend shares it with Friend .
In the end, three of his friends learn the secret, so we print .
Sample Input 2
20 12
7 11 10 1 7 20 14 2 17 3 2 5 19 20 8 14 18 2 10 10
Sample Output 2
7