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