#include <bits/stdc++.h>
using namespace std;
char in[10];
int main() {
  int n;
  cin >> n;
  long long h = 1LL;
  long long w = 1LL;
  for (int i = 0; i < n; ++i) {
    scanf("%s", in);
    string txt = in;
    if (txt == "UR" || txt == "DL") {
      ++h;
    } else if (txt == "UL" || txt == "DR") {
      ++w;
    } else {
      assert(txt == "ULDR");
      ++h;
      ++w;
    }
  }
  cout << h * w << endl;
}
