import std.stdio; import std.string; import std.conv; import std.math; import std.algorithm; // main============ void main(){ real[char] move = ['N':0, 'S':0, 'E':0, 'W':0]; foreach(c; readln.chomp){move[c] += 1;} writeln( ((move['N'] - move['S'])^^2 + (move['E'] - move['W'])^^2)^^0.5 ); }