import strutils, math let S = stdin.readLine x = S.count('E') - S.count('W') y = S.count('N') - S.count('S') echo (x ^ 2 + y ^ 2).float.sqrt.round(2)