#include <bits/stdc++.h>
using namespace std;
int n;
int gsur, gsul, gsdr, gsdl, gs;
char s[5];
int main() {
  scanf("%d", &n);
  gsur = gsul = gsdr = gsdl = gs = 0;
  for (int i = 0; i < n; i++) {
    scanf("%s", s);
    if (s[0] == 'U') {
      if (s[1] == 'R')
        gsur++;
      else if (strlen(s) == 2)
        gsul++;
      else
        gs++;
    } else {
      if (s[1] == 'R')
        gsdr++;
      else
        gsdl++;
    }
  }
  long long ans = gsur + gsdl + gs + 1;
  ans = ans * (gsul + gsdr + gs + 1);
  printf("%I64d\n", ans);
  return 0;
}
