#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
int aabs(int a) {
  if (a < 0) return -a;
  return a;
}
int gcd(int a, int b) {
  while (a > 0 && b > 0) {
    if (a > b) {
      a %= b;
    } else {
      b %= a;
    }
  }
  return a + b;
}
int main() {
  int n;
  cin >> n;
  string s[200013];
  int l = 1, r = 1;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] == "UL" || s[i] == "DR") {
      l++;
    }
    if (s[i] == "UR" || s[i] == "DL") {
      r++;
    }
    if (s[i] == "ULDR") {
      l++;
      r++;
    }
  }
  cout << (1ll * r) * l;
  return 0;
}
