#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, sx, sy, ex, ey, dx, dy, time = 0;
  string s;
  char x, y;
  cin >> t >> sx >> sy >> ex >> ey;
  cin >> s;
  if (ex > sx) {
    x = 'E';
    dx = 1;
  } else if (ex < sx) {
    x = 'W';
    dx = -1;
  } else {
    x = 'X';
  }
  if (ey > sy) {
    y = 'N';
    dy = 1;
  } else if (ey < sy) {
    y = 'S';
    dy = -1;
  } else {
    y = 'X';
  }
  for (auto ch : s) {
    if (sx == ex and sy == ey) break;
    if (ch == x and sx != ex) {
      sx += dx;
    } else if (ch == y and sy != ey) {
      sy += dy;
    }
    time++;
  }
  cout << (sx == ex and sy == ey ? time : -1);
  return 0;
}
