#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  long long x = 1, y = 1;
  while (n--) {
    char str[5];
    scanf("%s", str);
    if (strlen(str) == 4) {
      x++, y++;
    } else if (strcmp(str, "UL") == 0 || strcmp(str, "DR") == 0) {
      x++;
    } else {
      y++;
    }
  }
  printf("%I64d\n", x * y);
  return 0;
}
