#include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)<> s; int x = 0; int y = 0; rep(i,s.size()){ if(s[i] == 'N'){++y;} else if(s[i] == 'E'){++x;} else if(s[i] == 'W'){--x;} else if(s[i] == 'S'){--y;} } double ans = 0.0; ans = sqrt((x*x+y*y)*1.0); P(ans); return 0; }