N,Q=map(int,input().split())
s=list(input())
jyotai=[1]*N

#eioomoji=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]

dict={"A":[],"B":[],"C":[],"D":[],"E":[],"F":[],"G":[],"H":[],"I":[],"J":[],"K":[],"L":[],"M":[],"N":[],"O":[],"P":[],"Q":[],"R":[],"S":[],"T":[],"U":[],"V":[],"W":[],"X":[],"Y":[],"Z":[]}

for j in range(N):
  tmplist=dict[s[j]]
  tmplist.append(j)
  dict[s[j]]=tmplist
  


print(sum(jyotai))
