A balloon seller has balloons. Each balloon is of a certain color. Recently, a new law was passed that balloons can only be sold in a single color. To comply with the law and avoid losing profit, the seller decided to repaint some of the balloons.
Write a program to determine the minimum number of repaintings needed so that all balloons are the same color.
The first line contains the number of balloons (1 \le n \le 10^5).
The second line contains integers from to — the colors of the balloons: — blue — green — light blue — red — pink — yellow — gray — black — white
Output the minimum number of balloons that must be repainted so that all balloons are the same color.
Example 1
Example 2
Example 9