#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  char ch;
  for (int i = 0; i < t; i++) {
    cin >> ch;
    if (ch == 'E' && ex - sx > 0)
      sx++;
    else if (ch == 'S' && sy - ey > 0)
      sy--;
    else if (ch == 'W' && sx - ex > 0)
      sx--;
    else if (ch == 'N' && ey - sy > 0)
      sy++;
    if (sx == ex && sy == ey) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
