#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, sx, sy, ex, ey, xrq, yrq, ans = -1;
  char s[100010];
  cin >> t >> sx >> sy >> ex >> ey;
  gets(s);
  if (s[0] < 'A' || s[0] > 'Z') gets(s);
  if (sx == ex && sy == ey) {
    cout << "0";
    return 0;
  }
  for (int i = 0; i < t; i++) {
    if (s[i] == 'E' && ex > sx) sx++;
    if (s[i] == 'W' && ex < sx) sx--;
    if (s[i] == 'N' && ey > sy) sy++;
    if (s[i] == 'S' && ey < sy) sy--;
    if (sx == ex && sy == ey) {
      ans = i + 1;
      break;
    }
  }
  cout << ans;
}
