#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  int x = 1, y = 1;
  scanf("%d", &n);
  while (n--) {
    cin >> s;
    if (s == "UR" || s == "DL") {
      x++;
    } else if (s == "ULDR") {
      x++;
      y++;
    } else {
      y++;
    }
  }
  cout << 1LL * x * y << endl;
}
