#include <bits/stdc++.h>
int N, l, x = 1, y = 1;
char s[20];
int main() {
  for (scanf("%d", &N); N--;) {
    scanf("%s", s), l = strlen(s);
    if (l == 4)
      ++x, ++y;
    else if (s[0] == 'U' && s[1] == 'L' || s[0] == 'D' && s[1] == 'R')
      x++;
    else
      y++;
  }
  printf("%I64d\n", (long long)x * y);
  return 0;
}
