using System; class No113{ static void Main(){ var a=Console.ReadLine(); var x=0; var y=0; foreach(char b in a){ switch(b){ case 'N':++y;break; case 'S':--y;break; case 'E':++x;break; case 'W':--x;break; } } Console.WriteLine("{0:f4}",Math.Sqrt(x*x+y*y)); } }