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