#include #include int main() { char s; int x = 0, y = 0; while ((s = getchar()) != '\n') { if (s == 'N') y++; else if (s == 'E') x++; else if (s == 'W') x--; else if (s == 'S') y--; } printf("%.3lf\n", sqrt(x*x + y*y)); return 0; }