using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { string S = Console.ReadLine(); int nn = S.Count(c => c == 'N'); int ne = S.Count(c => c == 'E'); int nw = S.Count(c => c == 'W'); int ns = S.Count(c => c == 'S'); double fn = Math.Sqrt((nn - ns) * (nn - ns) + (ne - nw) * (ne - nw)); Console.WriteLine(fn); Console.ReadLine(); } } }