fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(java.util.Scanner(System.`in`), pw)
    pw.flush()
}

data class ModInt(var value: Long) {
    operator fun timesAssign(b: Long) {
        this.value *= b
        this.value %= MOD
    }

    companion object {
        const val MOD = 1000000007L
    }
}

fun <A> countList(a: List<A>): Map<A, Long> {
    val result = mutableMapOf<A, Long>()
    a.forEach {
        result[it] = (result[it] ?: 0L) + 1L
    }
    return result
}

object Problem {
    lateinit var dfs: (Int, Int) -> Unit

    fun solve(sc: java.util.Scanner, pw: java.io.PrintWriter) {
        val N = sc.next()
        val S = sc.next()

        val ans = ModInt(1L)
        countList(S.toList()).forEach { ent ->
            ans *= (ent.value + 1)
        }
        pw.println(ans.value - 1)
    }
}
