#include <bits/stdc++.h>
using namespace std;
int n;
char s[11];
char st[6][5] = {"", "UL", "UR", "DL", "DR", "ULDR"};
int main() {
  int x = 1, y = 1;
  int now;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s);
    for (int i = 1; i <= 5; i++) {
      if (strcmp(s, st[i]) == 0) {
        now = i;
        break;
      }
    }
    if (now == 1) y++;
    if (now == 2) x++;
    if (now == 3) x++;
    if (now == 4) y++;
    if (now == 5) x++, y++;
  }
  cout << (long long)x * y;
}
