inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
MOD = Math.pow(10, 9) + 7 
N = inp.shift() * 1
S = inp.shift()
o = {}
for (i=0; i<N; i++) {
    o[S[i]] = (o[S[i]] || 0) + 1
}
ans = 1
for (var k in o) {
    ans *= o[k] + 1
    ans = ans % MOD
}
console.log(ans - 1)