#include <bits/stdc++.h>
using namespace std;
#define ll long long

ll mod = 1e9+7;

int main(){
    int N;
    string S;
    cin >> N >> S;
    vector<ll> cnt(26, 0);
    for (char c : S) cnt[c-'a']++;
    ll ans = 1;
    for (ll n : cnt) ans = ans*(n+1)%mod;
    cout << (ans-1+mod)%mod << endl;
    return 0;
}