"use strict";

const main = (input) => {
  const N = input.split('\n')[0]-0;
  const S = input.split('\n')[1].split("");
  let wmap = {};
  
  S.forEach(function(w){
    wmap[w] = wmap[w]?wmap[w]+1:1;
  });
  
  let ans = 1;
  Object.keys(wmap).forEach((w)=>{
    ans *= wmap[w]+1;
    ans = ans%1000000007;
  });

  console.log(ans-1);
}

const pow = (a,b) => {
  var ans = 1;
  for(var i=0;i<b;i++){
    ans=ans*a;
    if(ans>=1000000007){
      ans = ans%1000000007;
    }
  }
  return ans;
};

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
