import std.stdio, std.math, std.string; void main(){ string str = readln.strip; auto n = str.count('N'), s = str.count('S'), w = str.count('W'), e = str.count('E'); double tmp = (n-s)^^2; tmp += (w-e)^^2; auto res = tmp.sqrt; writefln("%f", res); }