S=input() li=[] for i in range(len(S)): for j in range(len(S)): s=len(set(S[i:j+1])) if s>=1: li.append(s) print(sum(li)/len(li))