# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

# input
inputs = []
lc = 0
while l = $stdin.gets do
  if true
    inputs << l.chomp.split(" ").map(&:to_s)
  else
    inputs << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

# body

str = inputs[1][0]

if $debugFlag
  p str
end

hh = {}
str.length.times do |i|
  if hh[ str[i..i] ] == nil
    hh[ str[i..i] ] = 1
  else
    hh[ str[i..i] ] += 1
  end
end

mul = 1
hh.each do |k, v|
  mul *= (v + 1)
end

puts ((mul - 1) % (10**9 + 7))
