#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x, y, x1, y1, i, c = 0, d = 0;
  char a, b;
  cin >> t >> x >> y >> x1 >> y1;
  string s;
  cin >> s;
  if (x - x1 < 0)
    a = 'E';
  else {
    a = 'W';
  }
  if (y - y1 < 0)
    b = 'N';
  else {
    b = 'S';
  }
  for (i = 0; i < t; i++) {
    if (s[i] == a && c < abs(x - x1)) c++;
    if (s[i] == b && d < abs(y - y1)) d++;
    if (c == abs(x - x1) && d == abs(y - y1)) break;
  }
  if (c < abs(x - x1) || d < abs(y - y1))
    cout << -1;
  else {
    cout << i + 1;
  }
}
