You need to determine the maximum number of layers that can be formed by stacking a given set of round mochi (rice cakes). The constraints for stacking are that each mochi, except for the one at the bottom, must have a smaller diameter than the mochi directly beneath it.
Input Format
The first line contains an integer ( N ) (1 ≤ ( N ) ≤ 100), representing the number of mochi available.
The second line contains ( N ) integers ( d_1, d_2, \ldots, d_N ) (1 ≤ ( d_i ) ≤ 10^6) representing the diameters of the mochi in centimeters.
Output Format
Print a single integer representing the maximum number of layers that can be achieved by stacking the mochi.
Examples
Example 1
Input:
text
5
10 8 6 12 14
Output:
text
3
Explanation: The maximum stack can consist of diameters 14, 12, and 10.
Example 2
Input:
text
3
5 5 5
Output:
text
1
Explanation: All mochi have the same diameter, so only one can be stacked.
Constraints
( X ) (number of layers) must be ( X \geq 1 )
Diameters must adhere to the stated limits: ( 1 ≤ d_i ≤ 10^6 )
Implementation
Please implement your solution in the /app/ directory.