#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int prime = 9241;
const long double pi = acos(-1.);
struct segm {
  int x1, y1, x2, y2;
  segm(int x1, int y1, int x2, int y2) : x1(x1), y1(y1), x2(x2), y2(y2) {}
  segm() {}
};
int main() {
  int n;
  cin >> n;
  int ul = 0, ur = 0, dl = 0, dr = 0, uldr = 0;
  for (int i = 0; i < n; i++) {
    string tmp;
    cin >> tmp;
    if (tmp == "UL")
      ul++;
    else if (tmp == "UR")
      ur++;
    else if (tmp == "DL")
      dl++;
    else if (tmp == "DR")
      dr++;
    else if (tmp == "ULDR")
      uldr++;
    else {
      cout << "FAIL";
    }
  }
  segm cur0 = segm(0, ur, ur, 0);
  cur0.x1 -= dl;
  cur0.y2 -= dl;
  segm s1 = segm(cur0.x1 - ul, cur0.y1 - dr, cur0.x1 + dr, cur0.y1 + ul);
  segm s2 = segm(cur0.x2 - ul, cur0.y2 - dr, cur0.x2 + dr, cur0.y2 + ul);
  s1.y2 += uldr;
  s1.x1 -= uldr;
  s2.y1 -= uldr;
  s2.x2 += uldr;
  cout << (long long)(fabs(s1.y1 - s1.y2) + 1) *
              (long long)(fabs(s1.x1 - s2.x1) + 1)
       << endl;
  return 0;
}
