#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string winds;
  cin >> winds;
  if (sx == ex && sy == ey) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = (int)(0); i < (int)(t); ++i) {
    char d = winds[i];
    if (d == 'E' && sx < ex) {
      sx++;
    } else if (d == 'W' && ex < sx) {
      sx--;
    } else if (d == 'N' && sy < ey) {
      sy++;
    } else if (d == 'S' && ey < sy) {
      sy--;
    }
    if (sx == ex && sy == ey) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
