n = int(input())
s = input()
dp = [0] * (len(s) + 1)
dp[-1] = 1
mask = 0
max_mask = (1 << n) - 1
for i in range(len(s) - 1, -1, -1):
    mask |= (1 << (ord(s[i]) - ord('a')))
    dp[i] = dp[i + 1]
    if mask == max_mask:
        mask = 0
        dp[i] += 1

print(dp[0])


