#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, c, d;
  string direction;
  cin >> t >> a >> b >> c >> d;
  cin >> direction;
  int ans = 0;
  for (int i = 0; i < t; i++) {
    if (c - a > 0 && direction[i] == 'E')
      a++;
    else if (c - a < 0 && direction[i] == 'W')
      a--;
    else if (d - b > 0 && direction[i] == 'N')
      b++;
    else if (d - b < 0 && direction[i] == 'S')
      b--;
    ans++;
    if (c - a == 0 && d - b == 0) break;
  }
  if (c - a != 0 || d - b != 0)
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
