#include <bits/stdc++.h>
int main(void) {
  int t, sx, sy, ex, ey, i, j, p;
  int req[UCHAR_MAX] = {0};
  scanf("%d %d %d %d %d\n", &t, &sx, &sy, &ex, &ey);
  if (sx < ex)
    req['E'] = ex - sx;
  else
    req['W'] = sx - ex;
  if (sy < ey)
    req['N'] = ey - sy;
  else
    req['S'] = sy - ey;
  for (i = 1; i <= t; ++i) {
    --req[getchar()];
    p = 0;
    for (j = 0; j < 4; ++j) {
      if (req[(unsigned char)"NSWE"[j]] > 0) p = 1;
    }
    if (p == 0) {
      printf("%d\n", i);
      exit(EXIT_SUCCESS);
    }
  }
  printf("-1\n");
  exit(EXIT_SUCCESS);
}
