Time limit
2s
Memory limit
128 MB
Sejun has a bag containing N colored balls. One operation works as follows. First, he chooses one ball from the bag, then chooses a different ball from the bag. He repaints the second ball so that it has the same color as the first ball. After the paint dries, he puts both balls back into the bag and mixes them.
Find the expected number of repaint operations needed until all balls have the same color.
The first line contains the number of balls N. (1 ≤ N ≤ 24)
The second line contains a string of length N describing the colors of the balls. The string has no spaces, and each character is one uppercase English letter from A to Z.
Print the expected number of repaint operations needed until all balls have the same color.
Your answer is accepted if its absolute or relative error is at most 10^-8.