#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  long long int currx = sx, curry = sy;
  long long int val = 0;
  for (long long int i = 0; i < t; i++) {
    char ch;
    cin >> ch;
    if (currx == ex && curry == ey) {
      break;
    }
    if (ch == 'E') {
      if (ex > currx) {
        currx += 1;
        val++;
        continue;
      } else {
        val++;
        continue;
      }
    }
    if (ch == 'W') {
      if (ex < currx) {
        currx -= 1;
        val++;
        continue;
      } else {
        val++;
        continue;
      }
    }
    if (ch == 'N') {
      if (ey > curry) {
        curry += 1;
        val++;
        continue;
      } else {
        val++;
        continue;
      }
    }
    if (ch == 'S') {
      if (ey < curry) {
        curry -= 1;
        val++;
        continue;
      } else {
        val++;
        continue;
      }
    }
  }
  if (currx == ex && curry == ey) {
    cout << val;
  } else {
    cout << "-1";
  }
}
