#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  long long int r = ex - sx;
  long long int u = ey - sy;
  char p = 'E';
  if (r < 0) p = 'W', r = 0 - r;
  char q = 'N';
  if (u < 0) q = 'S', u = 0 - u;
  long long int count = 0, i = 0;
  while ((r > 0 or u > 0) and i < t) {
    if (s[i] == p)
      r--;
    else if (s[i] == q)
      u--;
    count++;
    i++;
  }
  if (r > 0 or u > 0)
    cout << "-1\n";
  else
    cout << count;
  return 0;
}
