#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, start_x, start_y, end_x, end_y;
  string wind;
  int ans = 0;
  cin >> t >> start_x >> start_y >> end_x >> end_y;
  cin >> wind;
  for (int i = 0; i < wind.size(); i++) {
    if (wind[i] == 'N' && end_y > start_y) {
      start_y++;
    } else if (wind[i] == 'S' && end_y < start_y) {
      start_y--;
    } else if (wind[i] == 'E' && end_x > start_x) {
      start_x++;
    } else if (wind[i] == 'W' && end_x < start_x) {
      start_x--;
    }
    ans++;
    if (start_x == end_x && start_y == end_y) {
      cout << ans << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
