using System; namespace No113_1{ public class Program{ public static void Main(string[] args){ var v = 0; var h = 0; foreach(var c in Console.ReadLine()){ switch(c){ case 'N': v++; break; case 'E': h--; break; case 'W': h++; break; case 'S': v--; break; } } Console.WriteLine(Math.Sqrt(v * v + h * h)); } } }