#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
 
int main(){
  int N;
  string S;
  cin >> N;
  cin >> S;
  map<char,int> mp;
  for(int i=0;i<N;i++){
    mp[S[i]]++;
  }
  long long ans = 1; 
  for(pair<char,int> p : mp){
    ans *= p.second+1;
    ans %= INF;
  }
  cout << ans-1 << endl;
}