#include<bits/stdc++.h>
using namespace std;
string s;
long long int ans=1,n;
map<char,long long int> m;
int main(){
  cin >> n >> s;
  for (size_t i = 0; i < n; i++) {
      m[s[i]]++;
  }
  for(auto x:m){
    ans = (ans*(x.second+1)) % 1000000007;
  }
  cout << ans-1;
}
