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