#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double pi = acos(-1.0);
const double eps = 1e-6;
int main() {
  int n;
  cin >> n;
  string s;
  long long a = 1, b = 1;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s == "UL")
      a++;
    else if (s == "DR")
      a++;
    else if (s == "UR")
      b++;
    else if (s == "DL")
      b++;
    else if (s == "ULDR") {
      a++;
      b++;
    }
  }
  cout << a * b << endl;
  return 0;
}
