#include <bits/stdc++.h>
using namespace std;
char buf[10];
int main(void) {
  int N, i;
  long long x = 1, y = 1;
  scanf("%d", &N);
  for ((i) = 0; (i) < (int)(N); (i)++) {
    scanf("%s", buf);
    string s = buf;
    if (s == "UL" || s == "DR")
      x++;
    else if (s == "UR" || s == "DL")
      y++;
    else {
      x++;
      y++;
    }
  }
  long long ans = x * y;
  cout << ans << endl;
  return 0;
}
