n = gets.to_i
s = gets.chomp

count = 0
(1..n).each do |len|
  if len == 1
    count += n
    next
  end
  s.chars.combination(len) do |chars|
    count += 1 if chars.uniq.size == chars.size
  end
end

puts count % 1_000_000_007
