from collections import Counter import math direction = input() cnt = Counter(direction) print(math.sqrt(sum(map(lambda x: x**2,cnt.values()))))