#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string wind;
  cin >> wind;
  bool east;
  bool north;
  if (sx > ex)
    east = false;
  else {
    east = true;
  }
  if (sy > ey)
    north = false;
  else {
    north = true;
  }
  for (int i = 0; i < t; i++) {
    if (wind[i] == 'E' && east && sx != ex)
      sx++;
    else if (wind[i] == 'W' && !east && sx != ex)
      sx--;
    else if (wind[i] == 'N' && north && sy != ey)
      sy++;
    else if (wind[i] == 'S' && !north && sy != ey) {
      sy--;
    }
    if (sy == ey && sx == ex) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
