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