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