#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, s_x, s_y, e_x, e_y;
  cin >> t >> s_x >> s_y >> e_x >> e_y;
  string wind;
  cin >> wind;
  vector<int> goal(4);
  if (e_x - s_x <= 0) {
    goal[0] = 0;
    goal[2] = s_x - e_x;
  } else {
    goal[0] = e_x - s_x;
    goal[2] = 0;
  }
  if (e_y - s_y <= 0) {
    goal[3] = 0;
    goal[1] = s_y - e_y;
  } else {
    goal[3] = e_y - s_y;
    goal[1] = 0;
  }
  int time = 0;
  for (auto i : wind) {
    bool all_done = 1;
    for (int j : goal) {
      if (j != 0) {
        all_done = 0;
      }
    }
    if (all_done) {
      break;
    }
    if (i == 'E' && goal[0] > 0) {
      goal[0] -= 1;
    }
    if (i == 'S' && goal[1] > 0) {
      goal[1] -= 1;
    }
    if (i == 'W' && goal[2] > 0) {
      goal[2] -= 1;
    }
    if (i == 'N' && goal[3] > 0) {
      goal[3] -= 1;
    }
    time += 1;
  }
  for (int i : goal) {
    if (i != 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << time << endl;
  return 0;
}
