#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  long long x = sx, y = sy;
  string str;
  cin >> str;
  if (x == ex && y == ey) {
    cout << 0;
    return 0;
  }
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == 'E' && ex - x > 0) x++;
    if (str[i] == 'S' && ey - y < 0) y--;
    if (str[i] == 'W' && ex - x < 0) x--;
    if (str[i] == 'N' && ey - y > 0) y++;
    if (x == ex && y == ey) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
