#include <bits/stdc++.h>
using namespace std;
int main() {
  long long ans = 0;
  long long first = 1, second = 1;
  int n;
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    if (s == "UR" || s == "DL")
      first++;
    else if (s == "ULDR")
      first++, second++;
    else
      second++;
  }
  cout << first * second << endl;
  return 0;
}
