#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:134217728")
using namespace std;
int n;
int a = 1, b = 1;
char buf[1 << 8];
int main() {
  scanf("%d", &n);
  while (n-- > 0) {
    scanf("%s", buf);
    if (strlen(buf) == 4) {
      a++, b++;
      continue;
    }
    if (buf[0] == 'U') {
      if (buf[1] == 'R')
        a++;
      else
        b++;
    } else {
      if (buf[1] == 'L')
        a++;
      else
        b++;
    }
  }
  printf("%I64d\n", (long long)a * b);
  return 0;
}
