local n = io.read("*n", "*l")
local s = io.read()
local t = {}
for i = 1, 26 do t[i] = 0 end
for i = 1, n do
  local p = s:sub(i, i):byte() - 96
  t[p] = t[p] + 1
end
local ret = 1
for i = 1, 26 do
  ret = (ret * (1 + t[i])) % 1000000007
end
print(ret - 1)
