#include using namespace std; typedef long long ll; #define rep(i,a,b) for(int i=a; ibool chmax(T& a, const T& b) { if(abool chmin(T& a, const T& b) { if(b; using pll = pair; const ll MOD = 1000000007; const ll INF = 1LL << 60; int main(){ int N; string S; cin >> N >> S; set setT; rep(i,0,N-1){ string T=S; T.replace(i,2,"BB"); setT.insert(T); } cout << (int)setT.size() << endl; }