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