n = gets.to_i
s = gets.chomp!
ans = 1
prime = 1000000007
array = []
("a".."z").each { |c|
  array.push([c,0])
}
s.chars { |c|
  array.each { |a|
    if a[0] == c
      a[1] += 1
    end
  }
}

# p array

array.each { |a|
  ans *= (a[1]+1)
  ans = ans % prime
}
puts ans-1
