Problem
We want to place fish in an aquarium,. Each fish is characterized by its size, which, for simplicity, we represent by a positive natural number. However, as we all know, big fish eat small fish! In our aquarium, this means that a fish with size eats any other fish with a size (strictly) smaller than . So, if we put the fish in the aquarium without much thought and leave them alone, after a while, there will probably be much fewer fish left!
Our goal is to find out the maximum amount of fish we can put in the aquarium without them eating each other.
Input
The input will consist of two lines.
The first line will contain only one natural number, .
The second line will contain positive natural numbers , , , , separated in pairs by a single space: the sizes of the fish.
Output
The output should consist of one line containing only one natural number : the maximum number of fish we can put in the aquarium without any of them being able to eat another.
Constraints
Execution time limit: 1 sec.
Memory limit: 16 MB.
Examples of Input - Output
1st
STDIN (fishtank.in)
7
5 9 8 4 2 4 6
STDOUT (fishtank.out)
5
2nd
STDIN (fishtank.in)
3
1 5 10
STDOUT (fishtank.out)
2
3d
STDIN (fishtank.in)
6
5 8 7 7 4 6
STDOUT (fishtank.out)
6
Explanation of the Examples: In each example, a subset of the fish is underlined, representing the maximum possible number of fish that can be placed in the aquarium without them eating each other. This subset has the maximum possible cardinality. Note that there may be other subsets with the same maximum number, for example, in the second example, any fish could be chosen for the aquarium.
Comments