#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t{1};
  while (t--) {
    string s;
    int n, sx, sy, fx, fy;
    cin >> n >> sx >> sy >> fx >> fy >> s;
    int side{fx - sx};
    int ud{fy - sy};
    char x;
    char y;
    if (side >= 0) {
      x = 'E';
    } else {
      x = 'W';
    }
    if (ud >= 0) {
      y = 'N';
    } else {
      y = 'S';
    }
    side = (side >= 0 ? side : -1 * side);
    ud = (ud >= 0 ? ud : -1 * ud);
    int time{0};
    for (auto i{0}; i < n; i++) {
      if (s[i] == x && side != 0) {
        side--;
      }
      if (s[i] == y && ud != 0) {
        ud--;
      }
      if (side == 0 && ud == 0) {
        time = i + 1;
        break;
      }
    }
    if (side == 0 && ud == 0) {
      cout << time << "\n";
    } else {
      cout << -1 << "\n";
    }
  }
  return 0;
}
