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