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