#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  long long xi, yi, xj, yj;
  string wind;
  bool can = false;
  cin >> T >> xi >> yi >> xj >> yj;
  cin >> wind;
  int cont = 0;
  for (; cont < wind.length(); cont++) {
    if (wind[cont] == 'N') {
      if (abs(yj - (yi + 1)) < abs(yj - yi)) yi++;
      if ((xi == xj) && (yi == yj)) {
        can = true;
        break;
      }
    } else if (wind[cont] == 'S') {
      if (abs(yj - (yi - 1)) < abs(yj - yi)) yi--;
      if ((xi == xj) && (yi == yj)) {
        can = true;
        break;
      }
    } else if (wind[cont] == 'W') {
      if (abs(xj - (xi - 1)) < abs(xj - xi)) xi--;
      if ((xi == xj) && (yi == yj)) {
        can = true;
        break;
      }
    } else if (wind[cont] == 'E') {
      if (abs(xj - (xi + 1)) < abs(xj - xi)) xi++;
      if ((xi == xj) && (yi == yj)) {
        can = true;
        break;
      }
    }
  }
  can ? cout << cont + 1 << endl : cout << "-1\n";
  return 0;
}
