fun main(args: Array<String>) {
    readLine()
    val arr = Array('z'-'a'+1){0}
    readLine()!!.forEach { arr[it-'a']+=1 }
    var result:Long = 1
    arr.forEach {if(it>0) result= result * (it+1).toLong() % 1000000007}
    print(result-1)
}