/*
TASK:flower
LANG:C++
*/

#include <stdio.h>
#include <string.h>

class vln
{
#define DC 4
private:
  unsigned long dig[DC];
public:
  void print(void);
  vln operator=(unsigned long a);
  vln operator*=(unsigned long a)
  {
    char i;
    long long t=0;
    for(i=0; i<DC; ++i)
    {
      t+=(long long)dig[i]*a;
      dig[i]=t%1000000000;
      t/=1000000000;
    }
    return *this;
  }
  vln operator+=(const vln &a);
  vln operator+(const vln &a)
  {
    vln t;
    t=*this;
    t+=a;
    return t;
  }

};

void vln::print(void)
  {
    char i;
    for(i=DC-1; i&&!dig[i]; --i);
    if(i==DC)
      printf("0");
    printf("%lu", dig[i]);
    for(--i; i>=0; --i)
      printf("%09lu", dig[i]);
  }

vln vln::operator=(unsigned long a)
  {
    char i;
    dig[0]=a;
    for(i=1; i<DC; ++i)
      dig[i]=0;
    return *this;
  }

vln vln::operator+=(const vln &a)
  {
    char i;
    long long t=0;
    for(i=0; i<DC; ++i)
    {
      t+=((long long)dig[i])+((long long)a.dig[i]);
      dig[i]=t%1000000000;
      t/=1000000000;
    }
    return *this;
  }
#undef DC
short n;
long long f[101][101];

long long calcf(short x)
{
  char i, j;
  memset(f, 0, 10201*sizeof(long));
  f[1][1]=1;
  for(i=2; i<=x; ++i)
    for(j=1; j<=i&&j<=x/2; ++j)
      if(i<=j<<1)
        f[i][j]=f[i-1][j-1]+f[i-1][j];
  return f[x][x/2];
}

unsigned long long fact(short n, short k)
{
  char divs[100];
  short i, j;
  unsigned long long res;
  res=1;
  if(k<n/2)
    k=n-k;
  memset(divs, 0, 100);
  memset(divs, 1, (n-k)*sizeof(char));
  for(i=k+1; i<=n; ++i)
  {
    res*=i;
    for(j=1; j<n; ++j)
      if(divs[j]&&res%(j+1)==0)
      {
        res/=j+1;
        divs[j]=0;
      }
  }
  return res;
}

int main(void)
{
//  printf("%Ld\n", calcf(70));
/*  vln t;
  t=1;
  t.print();
  printf("\n");
  t=calcf(70);
  t.print();
  printf("\n");*/
/*  vln a, b;
  long long x, y;
  x=y=3000000000;
  x+=y;
  b=a=3000000000;
  a+=b;
  a.print();
  printf("\n");*/
  char ch;
  short n, k=0;
  scanf("%hd", &n);
  while((ch=getchar())!=EOF)
    if(ch=='N')
      ++k;
  k*=2;
  printf("%Lu\n", calcf(k)*calcf(n-k)*fact(n, k)-1);
  return 0;
}

