import sys

stdin = sys.stdin

 

sys.setrecursionlimit(10**5) 

 

def li(): return list(map(int, stdin.readline().split()))

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(map(float, stdin.readline().split()))

def ls(): return stdin.readline().split()

def ns(): return stdin.readline().rstrip()

def lc(): return list(ns())

def ni(): return int(stdin.readline())

def nf(): return float(stdin.readline())



from collections import Counter



n = ni()

s = ns()



MOD = 10**9+7



cnt = Counter(s)

ans = 1



for key, val in list(cnt.items()):

    ans *= (val+1)

    ans %= MOD

    

ans -= 1

if ans < 0:

    ans += MOD

    

print(ans)
import sys

stdin = sys.stdin

 

sys.setrecursionlimit(10**5) 

 

def li(): return list(map(int, stdin.readline().split()))

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(map(float, stdin.readline().split()))

def ls(): return stdin.readline().split()

def ns(): return stdin.readline().rstrip()

def lc(): return list(ns())

def ni(): return int(stdin.readline())

def nf(): return float(stdin.readline())



from collections import Counter



n = ni()

s = ns()



cnt = Counter(s)



ans = 1

mod = 10**9+7



for k,v in list(cnt.items()):

    ans *= (v+1)

    ans %= mod

    

ans -= 1

if ans < 0:

    ans += mod

    

print(ans)
import sys

stdin = sys.stdin
sys.setrecursionlimit(10**5)


def li():
    return list(map(int, stdin.readline().split()))


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(map(float, stdin.readline().split()))


def ls():
    return stdin.readline().split()


def ns():
    return stdin.readline().rstrip()


def lc():
    return list(ns())


def ni():
    return int(stdin.readline())


def nf():
    return float(stdin.readline())


from collections import Counter

n = ni()
s = ns()
MOD = 10**9 + 7
cnt = Counter(s)
ans = 1
for key, val in list(cnt.items()):
    ans *= val + 1
    ans %= MOD
ans -= 1
if ans < 0:
    ans += MOD
print(ans)

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**5)


def li():
    return list(map(int, stdin.readline().split()))


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(map(float, stdin.readline().split()))


def ls():
    return stdin.readline().split()


def ns():
    return stdin.readline().rstrip()


def lc():
    return list(ns())


def ni():
    return int(stdin.readline())


def nf():
    return float(stdin.readline())


from collections import Counter

n = ni()
s = ns()
cnt = Counter(s)
ans = 1
mod = 10**9 + 7
for k, v in list(cnt.items()):
    ans *= v + 1
    ans %= mod
ans -= 1
if ans < 0:
    ans += mod
print(ans)

-MOD = 10**9 + 7 -for key, val in list(cnt.items()): -    ans *= val + 1 -    ans %= MOD +mod = 10**9 + 7 +for k, v in list(cnt.items()): +    ans *= v + 1 +    ans %= mod -    ans += MOD +    ans += mod