#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  long long int Nneed = 0;
  long long int Sneed = 0;
  long long int Eneed = 0;
  long long int Wneed = 0;
  if (ex > sx && ex >= 0 && sx >= 0 || ex > sx && ex < 0 && sx < 0 ||
      ex >= 0 && sx < 0) {
    Eneed = abs(abs(ex) - abs(sx));
  }
  if (ex < sx && ex >= 0 && sx >= 0 || ex < sx && ex < 0 && sx < 0 ||
      ex < 0 && sx >= 0) {
    Wneed = abs(abs(sx) - abs(ex));
  }
  if (ey - sy > 0) {
    Nneed = abs(abs(ey) - abs(sy));
  }
  if (ey - sy < 0) {
    Sneed = abs(abs(sy) - abs(ey));
  }
  long long int steps = 0;
  long long int i = 0;
  for (long long int i = 0;
       i < s.size() && (Nneed != 0 || Sneed != 0 || Eneed != 0 || Wneed != 0);
       i++) {
    if (s[i] == 'N' && Nneed == 0 || s[i] == 'S' && Sneed == 0 ||
        s[i] == 'E' && Eneed == 0 || s[i] == 'W' && Wneed == 0) {
      steps++;
      continue;
    }
    if (s[i] == 'N' && Nneed > 0) {
      Nneed--;
      steps++;
      continue;
    } else if (s[i] == 'S' && Sneed > 0) {
      Sneed--;
      steps++;
      continue;
    } else if (s[i] == 'E' && Eneed > 0) {
      Eneed--;
      steps++;
      continue;
    } else if (s[i] == 'W' && Wneed > 0) {
      Wneed--;
      steps++;
      continue;
    }
  }
  if (Nneed == 0 && Sneed == 0 && Eneed == 0 && Wneed == 0)
    cout << steps << "\n";
  else {
    cout << -1 << "\n";
  }
}
