#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, sx, sy, ex, ey;
  string path;
  cin >> t >> sx >> sy >> ex >> ey >> path;
  for (int i = 0; i < path.length(); i++) {
    char c = path[i];
    switch (c) {
      case 'E':
        if (ex > sx) sx++;
        break;
      case 'W':
        if (ex < sx) sx--;
        break;
      case 'N':
        if (ey > sy) sy++;
        break;
      case 'S':
        if (ey < sy) sy--;
        break;
    }
    if (sx == ex && sy == ey) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
