local n=io.read("n","l")
local s=io.read()

local t={}
for i=1,n do
    local a=s:sub(i,i)
    if not t[a] then
        t[a]=1
    else
        t[a]=t[a]+1
    end
end

local combination=1
for _,frequency in pairs(t) do
    combination=combination*(frequency+1)%1000000007
end
print(combination-1)