#include <bits/stdc++.h>
using namespace std;
int main() {
  int dx = 1, dy = 1;
  int n;
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    if (s == "UR" || s == "DL") {
      dx++;
    } else if (s == "UL" || s == "DR") {
      dy++;
    } else {
      dx++;
      dy++;
    }
  }
  cout << (long long)dx * dy << endl;
}
