#include <bits/stdc++.h>
#define ll long long

using namespace std;

const ll Mod = 1e9 + 7;

ll Cnt[26];

int main()
{
    ll n;       cin>>n;
    string s;   cin>>s;

    for(ll i=0;i<n;i++) Cnt[s[i]-'a']++;

    ll Ans = 1;

    for(ll i=0;i<26;i++)    Ans = ( Ans*(Cnt[i]+1) )%Mod;

    cout << ( Ans  - 1 + Mod )%Mod;
}
