#include <bits/stdc++.h>
inline int Rand() { return (rand() << 16) | rand(); }
using namespace std;
int n, x, y, xx, yy;
string s;
int main() {
  srand(time(NULL));
  cin >> n >> x >> y >> xx >> yy;
  cin >> s;
  if (x == xx && y == yy) cout << 0, exit(0);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'S' && y > yy)
      y--;
    else if (s[i] == 'E' && x < xx)
      x++;
    else if (s[i] == 'N' && y < yy)
      y++;
    else if (s[i] == 'W' && x > xx)
      x--;
    if (x == xx && y == yy) cout << i + 1, exit(0);
  }
  cout << -1;
  return 0;
}
