#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, px = 0, py = 0, fx = 0, fy = 0, dx = 0, dy = 0, i;
  string s;
  cin >> n >> px >> py >> fx >> fy;
  cin >> s;
  dx = fx - px;
  dy = fy - py;
  for (i = 0; i < n; i++) {
    if (fx == px && fy == py) {
      break;
    }
    if (s[i] == 'E' && fx > px) {
      px = px + 1;
    } else if (s[i] == 'S' && fy < py) {
      py = py - 1;
    } else if (s[i] == 'W' && fx < px) {
      px = px - 1;
    } else if (s[i] == 'N' && fy > py) {
      py = py + 1;
    }
  }
  if (fx == px && fy == py) {
    cout << i << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
