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