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