#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  char a[200010][5];
  while (~scanf("%d", &n)) {
    for (i = 0; i < n; i++) scanf("%s", a[i]);
    long long num1, num2, num3, num4;
    num1 = num2 = num3 = num4 = 0;
    for (i = 0; i < n; i++) {
      if (strcmp(a[i], "UL") == 0)
        num1++;
      else if (strcmp(a[i], "UR") == 0)
        num2++;
      else if (strcmp(a[i], "DL") == 0)
        num3++;
      else if (strcmp(a[i], "DR") == 0)
        num4++;
      else
        num2++, num1++;
    }
    long long len1 = num2 + num3 + 1;
    long long len2 = num1 + num4 + 1;
    printf("%lld\n", len1 * len2);
  }
  return 0;
}
