func main() var S: []char :: cui@input() var x: float var y: float for i(0, ^S - 1) switch(S[i]) case 'N' do y :+ 1.0 case 'E' do x :+ 1.0 case 'W' do x :- 1.0 case 'S' do y :- 1.0 end switch end for var ans: float :: lib@sqrt(x ^ 2.0 + y ^ 2.0) do cui@print("\{ans}\n") end func