#include <bits/stdc++.h>
using namespace std;
static const int INF = 500000000;
template <class T>
void debug(T a, T b) {
  for (; a != b; ++a) cerr << *a << ' ';
  cerr << endl;
}
int n;
char type[10][20] = {"UL", "UR", "DL", "DR", "ULDR"};
int dir[10];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    char tmp[20];
    scanf("%s", tmp);
    for (int j = 0; j < 5; ++j)
      if (strcmp(tmp, type[j]) == 0) ++dir[j];
  }
  dir[0] += dir[3];
  dir[1] += dir[2];
  long long int res =
      (dir[0] + 1 + dir[4]) * (long long int)(dir[1] + 1 + dir[4]);
  cout << res << endl;
  return 0;
}
