Problem 2716 · Easy
Every letter that appears can keep exactly one copy, so the answer is the number of distinct letters.
Open the interactive visualisation