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