#include <bits/stdc++.h>
using namespace std;
int n, w = 1, h = 1;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s.size() == 2) {
      if (s == "UR" || s == "DL")
        w++;
      else if (s == "UL" || s == "DR")
        h++;
    } else
      w++, h++;
  }
  cout << w * 1ll * h;
}
