#include #include #include using namespace std; int main(){ int length = 0; string s; cin >> s; for(int i = 0;i < s.size();i++){ if(s[i] == 'N' || s[i] == 'E') length++; else length--; } cout << sqrt(abs(length)) << endl;; }