#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int n;
char str[10];
int main() {
  int i, first = 1, second = 1;
  scanf("%d ", &n);
  for (i = 1; i <= n; ++i) {
    gets(str);
    if (str[0] == 'U' && str[1] == 'L' && str[2] == 'D' && str[3] == 'R')
      ++first, ++second;
    else if ((str[0] == 'U' && str[1] == 'L') ||
             (str[0] == 'D' && str[1] == 'R'))
      ++first;
    else
      ++second;
  }
  cout << (long long)first * second << endl;
  return 0;
}
