main(e,n,i){ char s[105]; e=0;n=0; scanf("%s",s); for (i=0;s[i];i++){ s[i]=='N'?n++:n; s[i]=='E'?e++:e; s[i]=='W'?e--:e; s[i]=='S'?n--:n; } printf("%lf",(double)sqrt(e*e+n*n)); }