#include<iostream>
#include<string> 
using namespace std;
#define LL long long
#define MOD 1000000007
int main()
{
	
	int n;
	string s;
	cin>>n>>s;
	LL ans=1;
	LL al[26]={0};
	for(int i=0;i<s.size();i++)
		al[s[i]-'a']++;
	for(int i=0;i<26;i++)
		ans=ans*(al[i]+1)%MOD;
	cout<<ans-1<<'\n';
	
	return 0;
}