#include <bits/stdc++.h>
using namespace std;
void solve() {
  int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  for (int i = 0; i < ((int)(s).size()); ++i) {
    if (s[i] == 'S' && ey < sy) {
      sy--;
    } else if (s[i] == 'E' && ex > sx) {
      sx++;
    } else if (s[i] == 'W' && ex < sx) {
      sx--;
    } else if (s[i] == 'N' && ey > sy) {
      sy++;
    }
    if (sx == ex && sy == ey) {
      cout << (i + 1 <= t ? i + 1 : -1) << "\n";
      return;
    }
  }
  cout << -1 << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
