package main import . "fmt" import . "math" func main() { m:=make(map[rune]int) for { var c rune Scanf("%c",&c) if c<1 { break } m[c]++ } x:=float64(m['W']-m['E']) y:=float64(m['N']-m['S']) d:=Sqrt(x*x+y*y) Println(d) }