import numpy as np

 

N = int(eval(input()))

S = eval(input())

 

unique_list = list(np.unique(S))

 

ans = 1

 

for s in unique_list:

  tmp = S.count(s)

  ans = ans * (tmp + 1)

  

print(((ans-1) % int((1e9 + 7))))
import collections



N = int(eval(input()))

S = eval(input())



d = collections.Counter(S)

ans = 1

for key in d:

  ans = ans * (d[key] + 1)

print(((ans-1) % (10**9 +7)))
import numpy as np

N = int(eval(input()))
S = eval(input())
unique_list = list(np.unique(S))
ans = 1
for s in unique_list:
    tmp = S.count(s)
    ans = ans * (tmp + 1)
print(((ans - 1) % int((1e9 + 7))))

import collections

N = int(eval(input()))
S = eval(input())
d = collections.Counter(S)
ans = 1
for key in d:
    ans = ans * (d[key] + 1)
print(((ans - 1) % (10**9 + 7)))

-import numpy as np +import collections -unique_list = list(np.unique(S)) +d = collections.Counter(S) -for s in unique_list: -    tmp = S.count(s) -    ans = ans * (tmp + 1) -print(((ans - 1) % int((1e9 + 7)))) +for key in d: +    ans = ans * (d[key] + 1) +print(((ans - 1) % (10**9 + 7)))