#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  int a = 1, b = 1;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s == "UR" || s == "DL") a++;
    if (s == "UL" || s == "DR") b++;
    if (s == "ULDR") a++, b++;
  }
  ll ans = (ll)a * (ll)b;
  return cout << ans << endl, 0;
}
