#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  long long a = 1, b = 1;
  while (n--) {
    string s;
    cin >> s;
    if (s == "UR") a++;
    if (s == "DL") a++;
    if (s == "UL") b++;
    if (s == "DR") b++;
    if (s == "ULDR") a++;
    if (s == "ULDR") b++;
  }
  cout << a * b << endl;
}
