import java.util.Scanner

object Main {
  def main(args: Array[String]) {
    val result = solve(new Scanner(System.in))
    if (result.length > 0) println(result)
  }

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    val N = sc.nextInt
    val S = sc.next

    var ans = 1
    for (c <- 'a' to 'z') {
      ans *= (S.count(_ == c) + 1) 
      ans %= 1000000007
    }
    ans -= 1
    ans.toString
  }
}
