#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  int a = 1, b = 1;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s == "UL" || s == "DR")
      a++;
    else if (s == "DL" || s == "UR")
      b++;
    else
      a++, b++;
  }
  cout << 1LL * a * b;
  return 0;
}
