LearnPy Hub
← Arena
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
solution.py
Output appears here
Make Every Count Different · Python Arena problem · LearnPy Hub