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