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