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