#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:33554432")
using namespace std;
const double PI = 2 * acos(0.0);
const double EPS = 1e-8;
const int INF = (1 << 30) - 1;
int q, m, n;
string s;
int main() {
  cin >> q;
  m = n = 1;
  for (int i = 0; i < q; ++i) {
    cin >> s;
    if (s == "UL" || s == "DR")
      ++m;
    else if (s == "ULDR") {
      ++m;
      ++n;
    } else
      ++n;
  };
  long long ans = m;
  cout << ans * n;
  return 0;
};
