n = gets.chomp.to_i
s = gets.chomp
BIGNUM i = 0
n.even? ? n : n = n / 2 + 1
for n in 1..n
  i += s.chars.combination(n).to_a.select{|a| a.length == a.uniq.length}.count
end
r = i % (1000000000 + 7)
print r