import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()
  val s = sc.next()

  val mod = 1_000_000_000 + 7L

  val map = mutableMapOf<Char, Int>()
  for (si in s) {
    val tmp = map.getOrElse(si) { 0 }
    map.put(si, tmp+1)
  }

  // val max = map.keys.size
  // println(max)

  var ans = 1L
  for (mi in map.values) {
    ans = ans * (mi + 1) % mod
  }

  println(ans - 1)

}
