#include <bits/stdc++.h>
using namespace std;
long long n, sx, sy, ex, ey;
char win[100005];
int main() {
  cin >> n >> sx >> sy >> ex >> ey;
  for (int i = 1; i <= n; i++) cin >> win[i];
  for (int i = 1; i <= n; i++) {
    if (win[i] == 'N') {
      if (sy < ey) sy++;
    }
    if (win[i] == 'E') {
      if (sx < ex) sx++;
    }
    if (win[i] == 'W') {
      if (sx > ex) sx--;
    }
    if (win[i] == 'S') {
      if (sy > ey) sy--;
    }
    if (sx == ex && sy == ey) {
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
