#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long t, sx, sy, ex, ey, ans = -1;
  cin >> t >> sx >> sy >> ex >> ey;
  long long xd = sx - ex, yd = sy - ey;
  char X, Y;
  if (xd > 0)
    X = 'W';
  else
    X = 'E';
  if (yd > 0)
    Y = 'S';
  else
    Y = 'N';
  xd = abs(xd);
  yd = abs(yd);
  string s;
  cin >> s;
  for (int i = 0; i < t; i++) {
    if (s[i] == X)
      xd--;
    else if (s[i] == Y)
      yd--;
    if (xd < 1 && yd < 1) {
      ans = i + 1;
      break;
    }
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
