program main
   implicit none
   integer(8):: n,han(97:122)=0,i,ans=1
   character(100000)::s
   read(*,*)n
   read(*,*)s
   do i=1,n
      han(iachar(s(i:i)))=han(iachar(s(i:i)))+1
   enddo
   do i=97,122
      ans=mod(ans*(han(i)+1),10**9+7)
   enddo
   ans=ans-1
   write(*,*)ans
end program main
