IntermediateRating 1300
Make Every Count Different
Delete as few characters as possible so that no two different letters appear the same number of times. Print how many you delete.
Input
One string.
Output
One integer.
Sample 1
Input
aab
Output
0
Sample 2
Input
aaabbbcc
Output
2
Output appears here