N = gets.to_i
S = gets.strip.split(//)

counts = {}

S.each{|c|
	if counts[c]
		counts[c] += 1
	else
		counts[c] = 1
	end
}

total = 1
counts.each{|c, count|
	total *= (count + 1)
}

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

