MOD = 10**9+7
module ModInt
  refine Fixnum do
    def +(b); (super b) % MOD; end
    def *(b); (super b) % MOD; end
  end
end

n = gets.to_i
cnt = Array.new(26,0)
gets.chomp.chars.each do |s|
  i = s.ord - 'a'.ord
  cnt[i] += 1
end

using ModInt
ans = 1
cnt.each do |n|
  ans = ans * (n + 1)
end
puts ans - 1