#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  int N;
  string S;
  int t[26] = {0};
  cin >> N;
  cin >> S;
  for (int i = 0; i < N; i++) {
    t[S[i] - 'a'] += 1;
  }
  long long ans = 1;
  for (int i = 0; i < 26; i++) {
    ans *= t[i] + 1;
  }
  ans = (ans - 1) % MOD;
  cout << ans << endl;
  return 0;
}
