#include <bits/stdc++.h>
using namespace std;
char x[10];
int main() {
  int t;
  while (cin >> t) {
    long long a = 1, b = 1;
    while (t--) {
      scanf("%s", x);
      if (strcmp(x, "UL") == 0 || strcmp(x, "DR") == 0)
        a++;
      else if (strcmp(x, "UR") == 0 || strcmp(x, "DL") == 0)
        b++;
      else {
        a++;
        b++;
      }
    }
    cout << a * b << endl;
  }
}
