#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int x = 1, y = 1;
  string s;
  while (n--)
    cin >> s, x += (s == "UR" or s == "DL" or s == "ULDR"),
        y += (s == "UL" or s == "DR" or s == "ULDR");
  cout << x * 1ll * y;
  return 0;
}
