

n = int(eval(input()))

s = list(eval(input()))

t = []

ans = 1

count= []



t = set(s)

t = list(t)



for i in range(len(t)):

    count.append(s.count(t[i]))



for j in range(len(count)):

    ans *= (count[j] + 1)



print(((ans-1)%(10**9 + 7)))



import collections

n = int(eval(input()))

s = list(eval(input()))



ans = 1

c = collections.Counter(s)

for i in set(s):

    ans *= (c[i] + 1)

print(((ans - 1) % (pow(10, 9) + 7)))

n = int(eval(input()))
s = list(eval(input()))
t = []
ans = 1
count = []
t = set(s)
t = list(t)
for i in range(len(t)):
    count.append(s.count(t[i]))
for j in range(len(count)):
    ans *= count[j] + 1
print(((ans - 1) % (10**9 + 7)))

import collections

n = int(eval(input()))
s = list(eval(input()))
ans = 1
c = collections.Counter(s)
for i in set(s):
    ans *= c[i] + 1
print(((ans - 1) % (pow(10, 9) + 7)))

+import collections + -t = [] -count = [] -t = set(s) -t = list(t) -for i in range(len(t)): -    count.append(s.count(t[i])) -for j in range(len(count)): -    ans *= count[j] + 1 -print(((ans - 1) % (10**9 + 7))) +c = collections.Counter(s) +for i in set(s): +    ans *= c[i] + 1 +print(((ans - 1) % (pow(10, 9) + 7)))