#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  int x = 1, y = 1;
  while (n--) {
    string s;
    cin >> s;
    if (s == "UR" || s == "DL")
      x++;
    else if (s == "UL" || s == "DR")
      y++;
    else
      x++, y++;
  }
  printf("%lld\n", 1ll * x * y);
  return 0;
}
