Answer: 10.

Solution: Let's count the number of each type of letter. $E$ appears 10 times, $W-2$ times, $N-6$ times, $S-$ 4 times. In total, the robot's goal is to move 8 km east and 2 km north. Therefore, without extra moves, the route would consist of $8+2=10$ moves.
2. Vasya constructed a robot, but he messed up the program, so the robot makes random moves that somehow always lead it to the right point.

A move is a one-kilometer displacement either north (N), east (E), south (S), or west (W).

The robot reached its goal in 22 moves:

# EENENNWNENESEEEEESSSWN.

How many moves would the robot need if it did not make any extra moves?