/*
TASK: flower
LANG: C
*/
#include <stdio.h>

 int n;
 long long a[102][102];
 long long bin[102][102];
 int c[4];

 int main ()
  {
   char pom[4];
   int i,j;
   scanf("%d",&n);
   for (i=1;i<=n;i++)
    {
     scanf("%s",pom);
     if (pom[0]=='N')c[0]++;
     if (pom[0]=='S')c[1]++;
     if (pom[0]=='W')c[2]++;
     if (pom[0]=='E')c[3]++;
    }
   a[0][0]=bin[0][0]=1;
   for (i=1;i<=n;i++)
    for (j=0;j<=i;j++)
     {
      a[i][j]=a[i-1][j];
      bin[i][j]=bin[i-1][j];
      if (j!=0)
       {
        a[i][j]+=a[i][j-1];
        bin[i][j]+=bin[i-1][j-1];
       }
     }
   i=c[0];j=c[2];
   printf("%lld\n",a[i][i]*a[j][j]*bin[2*i+2*j][2*i]-1);
   return 0;
  }
