#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, x1, y1, xst = 0, yst = 0, e = 0, w = 0, no = 0, s = 0;
  string s1;
  cin >> n >> x >> y >> x1 >> y1 >> s1;
  if (x1 - x > 0) {
    e = x1 - x;
  } else {
    w = abs(x1 - x);
  }
  if (y1 - y > 0) {
    no = y1 - y;
  } else {
    s = abs(y1 - y);
  }
  long long pos = 0;
  for (long long i = 0; i < n; i++) {
    if (e == 0 && w == 0 && s == 0 && no == 0) {
      cout << pos;
      return 0;
    } else {
      if (s1[i] == 'E' && e > 0) {
        pos = i + 1;
        e--;
      } else if (s1[i] == 'W' && w > 0) {
        pos = i + 1;
        w--;
      } else if (s1[i] == 'N' && no > 0) {
        pos = i + 1;
        no--;
      } else if (s1[i] == 'S' && s > 0) {
        pos = i + 1;
        s--;
      }
    }
  }
  if (e == 0 && w == 0 && s == 0 && no == 0) {
    cout << pos;
    return 0;
  }
  cout << -1;
}
