#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, sx, sy, ex, ey, need1, need2, ans;
  cin >> t >> sx >> sy >> ex >> ey;
  string directions;
  cin >> directions;
  need1 = ex - sx;
  need2 = ey - sy;
  if (need1 >= 0 && need2 >= 0) {
    for (int i = 0; i < directions.size(); i++) {
      if (directions[i] == 'E') {
        ans = i + 1;
        need1--;
      }
      if (directions[i] == 'N') {
        ans = i + 1;
        need2--;
      }
      if (need1 <= 0 && need2 <= 0) break;
    }
    if (need1 <= 0 && need2 <= 0)
      cout << ans;
    else
      cout << -1;
    return 0;
  }
  if (need1 >= 0 && need2 <= 0) {
    need2 = abs(need2);
    for (int i = 0; i < directions.size(); i++) {
      if (directions[i] == 'E') {
        ans = i + 1;
        need1--;
      }
      if (directions[i] == 'S') {
        ans = i + 1;
        need2--;
      }
      if (need1 <= 0 && need2 <= 0) break;
    }
    if (need1 <= 0 && need2 <= 0)
      cout << ans;
    else
      cout << -1;
    return 0;
  }
  if (need1 <= 0 && need2 >= 0) {
    need1 = abs(need1);
    for (int i = 0; i < directions.size(); i++) {
      if (directions[i] == 'W') {
        ans = i + 1;
        need1--;
      }
      if (directions[i] == 'N') {
        ans = i + 1;
        need2--;
      }
      if (need1 <= 0 && need2 <= 0) break;
    }
    if (need1 <= 0 && need2 <= 0)
      cout << ans;
    else
      cout << -1;
    return 0;
  }
  if (need1 <= 0 && need2 <= 0) {
    need1 = abs(need1);
    need2 = abs(need2);
    for (int i = 0; i < directions.size(); i++) {
      if (directions[i] == 'W') {
        ans = i + 1;
        need1--;
      }
      if (directions[i] == 'S') {
        ans = i + 1;
        need2--;
      }
      if (need1 <= 0 && need2 <= 0) break;
    }
    if (need1 <= 0 && need2 <= 0)
      cout << ans;
    else
      cout << -1;
  }
  return 0;
}
