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