#include <bits/stdc++.h>
using namespace std;
int x[6];
int n;
void init() {
  cin >> n;
  for (int k = 1; k <= n; k++) {
    string str;
    cin >> str;
    if (str == "UL") x[1]++;
    if (str == "UR") x[2]++;
    if (str == "DL") x[3]++;
    if (str == "DR") x[4]++;
    if (str == "ULDR") x[5]++;
  }
}
void solve() {
  long long ans = 0;
  for (int i = x[1] + x[2] + x[5]; i >= -(x[3] + x[4] + x[5]); i--)
    ans += ((x[1] + x[3] + x[5] - abs(i - x[2] + x[4])) +
            (x[2] + x[4] + x[5] - abs(i - x[1] + x[3]))) /
               2 +
           1;
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  init();
  solve();
  return 0;
}
