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