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