#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long int t, a, b, x, y;
  string s;
  long long int count = -1, i;
  cin >> t >> a >> b >> x >> y;
  cin >> s;
  for (i = 0; i < t; i++) {
    if (s[i] == 'E' && a < x)
      a++;
    else if (s[i] == 'S' && b > y)
      b--;
    else if (s[i] == 'W' && a > x)
      a--;
    else if (s[i] == 'N' && b < y)
      b++;
    if (a == x && b == y) {
      count = i + 1;
      break;
    }
  }
  cout << count << endl;
}
