#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t, sx, sy, ex, ey, time = 0, x, dx, y, dy;
  string s;
  cin >> t >> sx >> sy >> ex >> ey;
  cin >> s;
  (ex > sx ? (x = 'E', dx = 1) : (x = 'W', dx = -1));
  (ey > sy ? (y = 'N', dy = 1) : (y = 'S', dy = -1));
  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;
}
