#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k, x, y;
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  if (sx == ex && sy == ey) {
    cout << 0 << endl;
    return 0;
  }
  for (i = 0; i < t; i++) {
    if (s[i] == 'E') {
      if (sx < ex) sx++;
    } else if (s[i] == 'W') {
      if (sx > ex) sx--;
    } else if (s[i] == 'N') {
      if (sy < ey) sy++;
    } else {
      if (sy > ey) sy--;
    }
    if (sx == ex && sy == ey) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}
