#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char buf[10];
  scanf("%d", &n);
  int X = 1, Y = 1;
  for (int i = 0; i < n; ++i) {
    scanf("%s", buf);
    if (strcmp(buf, "UL") == 0 || strcmp(buf, "DR") == 0) {
      ++X;
    } else if (strcmp(buf, "UR") == 0 || strcmp(buf, "DL") == 0) {
      ++Y;
    } else {
      ++X;
      ++Y;
    }
  }
  cout << (long long)X * Y << endl;
  return 0;
}
