#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, sx, sy, ex, ey, dx, dy, time = 0;
  string s;
  char x, y;
  cin >> t >> sx >> sy >> ex >> ey;
  cin >> s;
  for (auto ch : s) {
    if (sx == ex and sy == ey) break;
    if (ch == 'N' and sy < ey) {
      sy++;
    } else if (ch == 'S' and sy > ey) {
      sy--;
    } else if (ch == 'E' and sx < ex) {
      sx++;
    } else if (ch == 'W' and sx > ex) {
      sx--;
    }
    time++;
  }
  cout << (sx == ex and sy == ey ? time : -1);
  return 0;
}
