const val MOD: Long = (1e9+7).toLong()

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val s = readLine()!!

    val c = Array(26, {1L})
    s.forEach{
        c[it - 'a'] = c[it - 'a'] + 1
    }
    val res = c.reduce { l, r ->
        (l * r) % MOD
    }
    println(res-1)
}
