#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int sX, sY;
  int eX, eY;
  cin >> sX >> sY >> eX >> eY;
  bool eastward = false;
  bool northward = false;
  if (eX - sX > 0) {
    eastward = true;
  }
  if (eY - sY > 0) {
    northward = true;
  }
  string directions;
  cin >> directions;
  int seconds = 0;
  for (char const &direction : directions) {
    if (sX == eX && sY == eY) {
      break;
    }
    if (sX != eX) {
      if (eastward && direction == 'E') {
        sX++;
      } else if (!eastward && direction == 'W') {
        sX--;
      }
    }
    if (sY != eY) {
      if (northward && direction == 'N') {
        sY++;
      } else if (!northward && direction == 'S') {
        sY--;
      }
    }
    seconds++;
  }
  if (sX == eX && sY == eY) {
    cout << seconds << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
