let rec pow acc n m =
  if m = 0 then acc else pow (acc * n) n (m - 1)

let pow = pow 1

let solve n s =
  let counter = Array.make 26 0 in
  let inc c = 
    let i = Char.code c - Char.code 'a' in counter.(i) <- counter.(i) + 1 in
  for ic = 0 to (String.length s) - 1 do
    String.get s ic |> inc
  done;
  let result = ref 1 in
  for i = 0 to 25 do
    if counter.(i) > 0 then result := !result * (counter.(i) + 1)
  done;
  (!result - 1) mod ((pow 10 9) + 7)

let _ =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let s = Scanf.scanf "%s\n" (fun s -> s) in
  print_int @@ solve n s