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