#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000;
const long double EPS = 1e-9;
char tmp[10];
string s;
long long a[4];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < int(4); ++i) {
    a[i] = 1;
  }
  long long l1 = 1, l2 = 1;
  for (int i = 0; i < int(n); ++i) {
    scanf("%s", &tmp);
    s = tmp;
    if (s.size() == 4) {
      ++l1;
      ++l2;
      continue;
    }
    if (s == "UL" || s == "DR") {
      ++l1;
      continue;
    }
    ++l2;
  }
  long long ans = l1 * l2;
  cout << ans << endl;
  return 0;
}
