#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  int cnt = 0, i;
  cin >> s;
  for (i = 0; i < t; i++) {
    cnt++;
    if (s[i] == 'E') {
      if (sx < ex) {
        sx += 1;
      }
    } else if (s[i] == 'S') {
      if (ey < sy) {
        sy = sy - 1;
      }
    } else if (s[i] == 'W') {
      if (ex < sx) {
        sx = sx - 1;
      }
    } else {
      if (sy < ey) {
        sy += 1;
      }
    }
    if (sx == ex && sy == ey) {
      cout << cnt;
      return 0;
    }
  }
  cout << "-1";
}
