#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  long long a = 1, b = 1;
  for (int i = 0; i < N; i++) {
    char s[5];
    scanf("%s", s);
    if (strcmp(s, "UR") == 0 || strcmp(s, "DL") == 0) {
      ++a;
    }
    if (strcmp(s, "UL") == 0 || strcmp(s, "DR") == 0) {
      ++b;
    }
    if (strcmp(s, "ULDR") == 0) {
      ++a;
      ++b;
    }
  }
  printf("%lld\n", a * b);
  return 0;
}
