#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::string;
int main() {
  int n;
  long long a = 1, b = 1;
  string s;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "UL" || s == "DR")
      a++;
    else if (s == "UR" || s == "DL")
      b++;
    else
      a++, b++;
  }
  cout << a * b << '\n';
  return 0;
}
