#include <bits/stdc++.h>
using namespace std;
char s[100001];
int main() {
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey >> s;
  int dx = ex - sx, dy = ey - sy;
  if (dx == 0 && dy == 0) {
    printf("0\n");
    return 0;
  }
  for (int i = 0; i < t; i++) {
    dx -= (dx > 0 && s[i] == 'E');
    dx += (dx < 0 && s[i] == 'W');
    dy -= (dy > 0 && s[i] == 'N');
    dy += (dy < 0 && s[i] == 'S');
    if (dx == 0 && dy == 0) {
      printf("%d", i + 1);
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
