#include <bits/stdc++.h>
using namespace std;
int n;
long long x, y;
char ch[10];
int main() {
  x = y = 1;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", ch);
    int sum = 0;
    for (int i = 0, l = strlen(ch); i < l; i++) sum += ch[i];
    if (sum == 161 || sum == 150) x++;
    if (sum == 167 || sum == 144) y++;
    if (sum == 311) x++, y++;
  }
  cout << x * y << endl;
  return 0;
}
