#include <bits/stdc++.h>
using namespace std;
int suma,N;
int main (){
    string s;
    cin>>N>>s;
    suma=1;
    if(N==26){cout<<"0"<<endl;}
    else {for(int i=1;i<N;i++){
              if(s[i]==s[i-1] and N!=26){suma=suma*2;}
    }
    cout<<suma<<endl;
    }

return 0;
}