It's time to do the dishes! The household logistics division (you) have been tasked with stacking the various cups, bowls and other topologically similar vessels to minimise the amount of shelf-space they take up.
There are \(N\) such vessels in the kitchen each with a diameter \(d_i\). It is possible to stack any vessel of a smaller diameter into one with a larger diameter which can, in turn, be stacked into another.
Find the smallest number of stacks you need to store all of your cup-esque vessels.
Two lines. The first contains \(N (1 \leq N \leq 1000)\) the number of vessels in the kitchen. The second contains \(N\) space-separated integers \(d_i (1 \leq d_i \leq 10000)\), the diameter of the ith vessel.
The number of stacks needed to store all items.
Sample Input 1
5 3 2 1 2 1
Sample Output 1
Sample Input 2
3 100 2 2
Sample Output 2