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