#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1, n;
  while (t--) {
    cin >> n;
    string s;
    long long h = 1, w = 1;
    for (long long i = 0; i < n; i++) {
      cin >> s;
      if (s == "DR" || s == "UL")
        h++;
      else if (s == "DL" || s == "UR")
        w++;
      else
        h++, w++;
    }
    cout << h * w << '\n';
  }
  return 0;
}
