The seller has n balloons. Each balloon has some color. However, recently Three Fat Men issued a decree permitting to sell the balls of a single color. In order not to break the law, but not to lose profits, the seller decided to repaint some of his balls.
Write a program to determine the minimum number of repainting.
First line contains the number of balloons n (1 ≤ n ≤ 10^5
). Second line contains n integers in the range from 1 to 9, determining the colors of the balls (1 - blue, 2 - green, 3 - cyan, 4 - red, 5 - rose, 6 - yellow, 7 - gray, 8 - black, 9 - white).
Print the minimum number of balloons to repaint so that all balls have the same color.