#include <bits/stdc++.h>
using namespace std;
int mov[4][2] = {
    -1, 0, 0, 1, 1, 0, 0, -1,
};
template <typename T>
struct number_iterator : std::iterator<random_access_iterator_tag, T> {
  T v;
  number_iterator(T _v) : v(_v) {}
  operator T&() { return v; }
  T operator*() const { return v; }
};
template <typename T>
struct number_range {
  T b, e;
  number_range(T b, T e) : b(b), e(e) {}
  number_iterator<T> begin() { return b; }
  number_iterator<T> end() { return e; }
};
template <typename T>
number_range<T> range(T e) {
  return number_range<T>(0, e);
}
template <typename T>
number_range<T> range(T b, T e) {
  return number_range<T>(b, e);
}
int main() {
  int n;
  pair<int, int> s, t;
  cin >> n >> s.first >> s.second >> t.first >> t.second;
  string str;
  cin >> str;
  int ans = -1;
  for (auto i : range(n)) {
    char ch = str[i];
    if (ch == 'E' && s.first < t.first)
      s.first++;
    else if (ch == 'W' && s.first > t.first)
      s.first--;
    else if (ch == 'N' && s.second < t.second)
      s.second++;
    else if (ch == 'S' && s.second > t.second)
      s.second--;
    if (s == t) {
      ans = i + 1;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
