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