gets
strs = gets.chomp.split('')

strs_group = strs.group_by { |char| char }.values

count = 1

strs_group.each { |chars| count = count * (chars.length + 1) }

count = count - 1

puts (count % (10 ** 9 + 7))