#include<bits/stdc++.h>
#define ll long long 
#define mp make_pair 
#define f(i,n) for(int i=0;i<n;i++) 
#define F first 
#define S second 
#define pb push_back 

using namespace std;

string s[70];
ll n;
ll cache[70][2];

ll dp(ll i, ll j){
	if(i==n and j==1)
		return 1;
	else if(i==n)
		return 0;
	if(cache[i][j]!=-1)
		return cache[i][j];
	ll res = 0;
	if(s[i]=="OR"){
		//  using 1
		res = res + dp(i+1,1);
		// using 0
		res = res + dp(i+1,j);
	}else{
		res = res + dp(i+1,j&1);
		res = res + dp(i+1,0);
	}
	cache[i][j] = res;
	return res;
}


void test(){
	cin>>n;
	f(i,n)cin>>s[i];
	memset(cache,-1,sizeof(cache));
	cout<<dp(0,0) + dp(0,1)<<"\n";
}

int main(){
	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	// cin>>tests;
	while(tests--){
		test();
	}
}
