#include #include int main(void) { int south_and_north = 0; int east_and_west = 0; char c[101]; int i; scanf("%s",c); for(i=0;c[i]!='\0';i++){ switch(c[i]){ case 'N':south_and_north++; case 'S':south_and_north--; case 'E':east_and_west++; case 'W':east_and_west--; } } printf("%f",sqrt(south_and_north*south_and_north+east_and_west*east_and_west)\ ); return 0; }