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