#include using namespace std; using ch = char; using ll = long long; using ld = long double; using db = double; using st = string; using vdb = vector; using vvdb = vector; using vl = vector; using vvl = vector; using vd = vector; using vvd = vector; using vs = vector; using vvs = vector; using vc = vector; using vvc = vector; using vb = vector; using vvb = vector; const ll mod = 998244353; const ll MOD = 1000000007; using vp = vector>; #define fi first #define se second int main(){ ll N; cin>>N; st S; cin>>S; ll ans=1; ll a,b,c; ll f=0; if(S.at(0)=='A') c=0; else c=1; for(int i=1; i