#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  char s[5];
  long long ll, rr;
  scanf("%d", &n);
  getchar();
  ll = rr = 1;
  for (i = 1; i <= n; i++) {
    gets(s);
    int len = strlen(s);
    if (len == 4) {
      ll++;
      rr++;
    } else {
      if (strcmp(s, "UL") == 0) ll++;
      if (strcmp(s, "DR") == 0) ll++;
      if (strcmp(s, "UR") == 0) rr++;
      if (strcmp(s, "DL") == 0) rr++;
    }
  }
  printf("%I64d\n", ll * rr);
  return 0;
}
