#include <bits/stdc++.h>
using namespace std;
map<char, long long> m;
int main() {
  long long n, sx, sy, ex, ey, mint = 0;
  long long dx, dy;
  bool flag = false;
  string dir;
  cin >> n >> sx >> sy >> ex >> ey;
  dx = ex - sy;
  dy = ex - sy;
  cin >> dir;
  for (long long i = 0; i < n; ++i) {
    dx = ex - sx;
    dy = ey - sy;
    if (sx == ex && sy == ey) {
      cout << mint << endl;
      flag = true;
      break;
    }
    if (dir[i] == 'E' && dx > 0) {
      sx = sx + 1;
    }
    if (dir[i] == 'S' && dy < 0) {
      sy = sy - 1;
    }
    if (dir[i] == 'W' && dx < 0) {
      sx = sx - 1;
    }
    if (dir[i] == 'N' && dy > 0) {
      sy = sy + 1;
    }
    ++mint;
    if (sx == ex && sy == ey) {
      cout << mint << endl;
      flag = true;
      break;
    }
  }
  if (!flag) cout << "-1" << endl;
  return 0;
}
