#include <bits/stdc++.h>
inline int maxx(int a, int b) { return a > b ? a : b; }
inline int minn(int a, int b) { return a < b ? a : b; }
inline void swap(int &a, int &b) {
  int tt = a;
  a = b;
  b = tt;
  return;
}
inline void swap_ll(long long &a, long long &b) {
  long long tt = a;
  a = b;
  b = tt;
  return;
}
inline void swap_db(double &a, double &b) {
  double tt = a;
  a = b;
  b = tt;
  return;
}
using namespace std;
int n;
char data[5];
long long h, c;
int main() {
  int i, j, k;
  scanf("%d", &n);
  getchar();
  for (i = h = c = 1; i <= n; i++) {
    gets(data);
    if (strcmp(data, "UR") == 0 || strcmp(data, "DL") == 0)
      h++;
    else if (strcmp(data, "UL") == 0 || strcmp(data, "DR") == 0)
      c++;
    else
      h++, c++;
  }
  printf("%I64d\n", h * c);
  return 0;
}
