#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod=1e9+7;

int main(){
    int N;
    string S;
    cin >> N >> S;
    map<char, ll> m;
    for(auto c: S) m[c]++;
    ll ans=1;
    for(auto x: m){
        ans *= (x.second + 1);
        ans %= mod;
    }
    cout << ans-1;
}