#include <bits/stdc++.h>
using namespace std;
int dirx[] = {1, -1, 0, 0};
int diry[] = {0, 0, 1, -1};
const int N = 10e5 + 1;
char a[N];
int main() {
  int n, x1, y1, x2, y2;
  cin >> n >> x1 >> y1 >> x2 >> y2;
  scanf("%s", a);
  int d = -1, count = 0, newx, newy;
  for (int i = 0; i < n; i++) {
    count++;
    if (a[i] == 'E')
      d = 0;
    else if (a[i] == 'S')
      d = 3;
    else if (a[i] == 'W')
      d = 1;
    else
      d = 2;
    newx = x1 + dirx[d];
    newy = y1 + diry[d];
    if (abs(x2 - newx) < abs(x2 - x1) || abs(y2 - newy) < abs(y2 - y1)) {
      x1 = newx;
      y1 = newy;
    }
    if (x1 == x2 && y1 == y2) {
      cout << count << endl;
      return 0;
    }
  }
  cout << -1;
}
