#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, sx, sy, ex, ey, e = 0, w = 0, n = 0, s = 0, i;
  cin >> t >> sx >> sy >> ex >> ey;
  char a[t + 1];
  cin >> a;
  if (ex - sx > 0)
    e = ex - sx;
  else
    w = sx - ex;
  if (ey - sy > 0)
    n = ey - sy;
  else
    s = sy - ey;
  for (i = 1; i <= t; i++) {
    switch (a[i - 1]) {
      case 'S':
        s = (s > 0) ? s - 1 : 0;
        break;
      case 'E':
        e = (e > 0) ? e - 1 : 0;
        break;
      case 'W':
        w = (w > 0) ? w - 1 : 0;
        break;
      case 'N':
        n = (n > 0) ? n - 1 : 0;
        break;
    }
    if (s == 0 && w == 0 && n == 0 && e == 0) {
      cout << i;
      return 0;
    }
  }
  cout << "-1";
  return 0;
}
