#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int MaxN = 1000006, MaxBuf = 32, NA = -1, MaxC = 0x3F3F3F3F;
int a[MaxN];
char buf[MaxBuf];
int n;
int main(void) {
  int i;
  long long front, back;
  while (scanf(" %d", &n) != EOF) {
    front = back = 1;
    for (i = 0; i < n; i++) {
      scanf(" %s", buf);
      if (!strcmp(buf, "UL")) {
        front++;
      } else if (!strcmp(buf, "UR")) {
        back++;
      } else if (!strcmp(buf, "DL")) {
        back++;
      } else if (!strcmp(buf, "DR")) {
        front++;
      } else if (!strcmp(buf, "ULDR")) {
        front++;
        back++;
      } else
        assert(false);
    }
    printf(
        "%lld"
        "\n",
        front * back);
  }
  return 0;
}
