import java.util.*

fun main(args: Array<String>) {

    val sc = Scanner(System.`in`)
    val N = sc.nextInt()
    val S = sc.next()
    val map = mutableMapOf<Char,Int>()
    for (c in S)
        map[c] = (map[c] ?: 0) +1

    var ans = 1L
    for (v in map.values) {//aabbbc ={a,a, }*{b,b,b, }*{c, }
        ans *= v+1
        ans %= 1000000007L
    }
    ans--
    println(ans)
}