#include <bits/stdc++.h>
using namespace std;
int main() {
  int len;
  int x, y;
  int ex, ey;
  string str;
  cin >> len >> x >> y >> ex >> ey;
  cin >> str;
  if (x == ex && y == ey) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == 'S') {
      if (ey < y) y--;
    } else if (str[i] == 'E') {
      if (ex > x) x++;
    } else if (str[i] == 'W') {
      if (ex < x) x--;
    } else {
      if (ey > y) y++;
    }
    if (x == ex && y == ey) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  puts("-1");
}
