#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  string s;
  cin >> s;
  for (int i = 0; i < t; i++) {
    if (s[i] == 'N' && d - b > 0) {
      b++;
    } else if (s[i] == 'S' && d - b < 0) {
      b--;
    } else if (s[i] == 'E' && c - a > 0) {
      a++;
    } else if (s[i] == 'W' && c - a < 0) {
      a--;
    }
    if (c == a && b == d) {
      cout << i + 1 << "\n";
      return 0;
    }
  }
  if (c == a && b == d) {
    cout << t << "\n";
  } else
    cout << "-1\n";
}
